HTTP/2 301
date: Thu, 09 Oct 2025 20:00:15 GMT
content-length: 0
location: https://learn.microsoft.com/en-us/dotnet/api/system.windows.automation.expandcollapsepattern?redirectedfrom=MSDN
cache-control: public,max-age=600
strict-transport-security: max-age=2592000
request-context: appId=cid-v1:a7c67087-5e2a-4790-bab5-5262204d7a98
x-content-type-options: nosniff
x-redirectdb-info: Content level redirect, Id: ms523279, Locale: en-us, Pfv: vs.110
x-azure-ref: 20251009T200014Z-16df8d664984qlnqhC1BOMhqf800000004sg000000006b5y
x-fd-int-roxy-purgeid: 0
x-cache: TCP_MISS
nel: {"report_to":"network-errors","max_age":604800,"success_fraction":0.01,"failure_fraction":1.0}
report-to: {"group":"network-errors","max_age":604800,"endpoints":[{"url":"https://mdec.nelreports.net/api/report?cat=mtps-redirect"}]}
HTTP/2 301
content-length: 0
location: /en-us/dotnet/api/system.windows.automation.expandcollapsepattern?view=windowsdesktop-9.0&redirectedfrom=MSDN
content-security-policy: default-src *;script-src 'self' 'unsafe-inline' 'unsafe-eval' *.microsoft.com js.monitor.azure.com dc.services.visualstudio.com try-ppe.dot.net aznb-ame-prod.azureedge.net client-api.arkoselabs.com markdowneditor-public-e0gpfpcwcbbze3ag.b01.azurefd.net markdowneditor-external-Public-fmgmfefddycxdmfj.b01.azurefd.net h64.online-metrix.net;style-src 'self' 'unsafe-inline' *.microsoft.com aznb-ame-prod.azureedge.net try-ppe.dot.net markdowneditor-public-e0gpfpcwcbbze3ag.b01.azurefd.net markdowneditor-external-Public-fmgmfefddycxdmfj.b01.azurefd.net;img-src * data: blob:;frame-ancestors docs.microsoft.com *.docs.microsoft.com learn.microsoft.com *.learn.microsoft.com labclient.labondemand.com portal.azure.com *.portal.azure.com portal.azure.us portal.azure.cn ai.azure.com *.ai.azure.com learn-video.azurefd.net docs.azure.cn *.onecloud.azure-test.net *.sharepoint.com localhost:3000;worker-src 'self' blob: *.microsoft.com aznb-ame-prod.azureedge.net;form-action 'self' *.microsoft.com *.azure.cn *.pearsonvue.com;media-src 'self' blob: *.microsoft.com *.azure.cn videoencodingpublic-hgeaeyeba8gycee3.b01.azurefd.net videoencodingpubdevwus.blob.core.windows.net videoencodingpublicwus.blob.core.windows.net;base-uri 'self';font-src 'self' https: data:;object-src 'none';script-src-attr 'none';upgrade-insecure-requests
cross-origin-opener-policy: unsafe-none
cross-origin-resource-policy: cross-origin
origin-agent-cluster: ?1
referrer-policy: strict-origin-when-cross-origin
x-content-type-options: nosniff
x-dns-prefetch-control: off
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-xss-protection: 0
x-buildversion: 0.4.03202.7156-c5050e6c
x-azure-ref: 20251009T200015Z-r1974bb47b6cmxrhhC1MAAkzhw000000029g000000001r17
nel: {"report_to":"network-errors","max_age":604800,"success_fraction":0.01,"failure_fraction":1.0}
report-to: {"group":"network-errors","max_age":604800,"endpoints":[{"url":"https://mdec.nelreports.net/api/report?cat=mdocs"}]}
cache-control: public, max-age=1800
expires: Thu, 09 Oct 2025 20:30:16 GMT
date: Thu, 09 Oct 2025 20:00:16 GMT
akamai-cache-status: Miss from child, NotCacheable from parent
strict-transport-security: max-age=31536000; includeSubDomains; preload
HTTP/2 200
content-type: text/html
etag: "G6ruXWpi43ILsncBD19uTt90G0Q="
last-modified: Sun, 03 Aug 2025 15:44:29 GMT
content-security-policy: default-src *;script-src 'self' 'unsafe-inline' 'unsafe-eval' *.microsoft.com js.monitor.azure.com dc.services.visualstudio.com try-ppe.dot.net aznb-ame-prod.azureedge.net client-api.arkoselabs.com markdowneditor-public-e0gpfpcwcbbze3ag.b01.azurefd.net markdowneditor-external-Public-fmgmfefddycxdmfj.b01.azurefd.net h64.online-metrix.net;style-src 'self' 'unsafe-inline' *.microsoft.com aznb-ame-prod.azureedge.net try-ppe.dot.net markdowneditor-public-e0gpfpcwcbbze3ag.b01.azurefd.net markdowneditor-external-Public-fmgmfefddycxdmfj.b01.azurefd.net;img-src * data: blob:;frame-ancestors docs.microsoft.com *.docs.microsoft.com learn.microsoft.com *.learn.microsoft.com labclient.labondemand.com portal.azure.com *.portal.azure.com portal.azure.us portal.azure.cn ai.azure.com *.ai.azure.com learn-video.azurefd.net docs.azure.cn *.onecloud.azure-test.net *.sharepoint.com localhost:3000;worker-src 'self' blob: *.microsoft.com aznb-ame-prod.azureedge.net;form-action 'self' *.microsoft.com *.azure.cn *.pearsonvue.com;media-src 'self' blob: *.microsoft.com *.azure.cn videoencodingpublic-hgeaeyeba8gycee3.b01.azurefd.net videoencodingpubdevwus.blob.core.windows.net videoencodingpublicwus.blob.core.windows.net;base-uri 'self';font-src 'self' https: data:;object-src 'none';script-src-attr 'none';upgrade-insecure-requests
cross-origin-opener-policy: unsafe-none
cross-origin-resource-policy: cross-origin
origin-agent-cluster: ?1
referrer-policy: strict-origin-when-cross-origin
x-content-type-options: nosniff
x-dns-prefetch-control: off
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-xss-protection: 0
x-buildversion: 0.4.03202.7156-c5050e6c
x-azure-ref: 20251009T200016Z-r157b799b94hmw77hC1MAAeebn000000016g000000001k8d
nel: {"report_to":"network-errors","max_age":604800,"success_fraction":0.01,"failure_fraction":1.0}
report-to: {"group":"network-errors","max_age":604800,"endpoints":[{"url":"https://mdec.nelreports.net/api/report?cat=mdocs"}]}
cache-control: public, max-age=600
expires: Thu, 09 Oct 2025 20:10:16 GMT
date: Thu, 09 Oct 2025 20:00:16 GMT
akamai-cache-status: Miss from child, Miss from parent
strict-transport-security: max-age=31536000; includeSubDomains; preload
ExpandCollapsePattern Class (System.Windows.Automation) | Microsoft Learn
Ask Learn
Ask Learn
Focus mode
Language
Table of contents
Read in English
Add
Add to plan
Edit
Share via
Facebook
LinkedIn
Email
Print
ExpandCollapsePattern Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents controls that visually expand to display content and collapse to hide content.
public ref class ExpandCollapsePattern : System::Windows::Automation::BasePattern
public class ExpandCollapsePattern : System.Windows.Automation.BasePattern
type ExpandCollapsePattern = class
inherit BasePattern
Public Class ExpandCollapsePattern
Inherits BasePattern
Inheritance
Aggregate controls - built with child objects that provide the UI for expand/collapse functionality - must support the ExpandCollapsePattern control pattern while their child elements do not. For example, a combo box control is built with a combination of list box, button, and edit controls, but it is only the parent combo box that must support the ExpandCollapsePattern .
Note
A menu control, even though an aggregate of individual menu items, is an exception to this rule. The menu items support the ExpandCollapsePattern control pattern, but the parent menu control does not. A similar exception applies to the tree and tree item controls.
Fields
Properties
Methods
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide .