ExpanderAutomationPeer 類別

定義

展開器類型公開給 Microsoft 消費者介面自動化。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

/// [Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
/// [Windows.Foundation.Metadata.Experimental]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
class ExpanderAutomationPeer : FrameworkElementAutomationPeer, IExpandCollapseProvider
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
class ExpanderAutomationPeer : FrameworkElementAutomationPeer, IExpandCollapseProvider
[Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
[Windows.Foundation.Metadata.Experimental]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public class ExpanderAutomationPeer : FrameworkElementAutomationPeer, IExpandCollapseProvider
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
public class ExpanderAutomationPeer : FrameworkElementAutomationPeer, IExpandCollapseProvider
Public Class ExpanderAutomationPeer
Inherits FrameworkElementAutomationPeer
Implements IExpandCollapseProvider
繼承
ExpanderAutomationPeer
屬性
實作

建構函式

ExpanderAutomationPeer(Expander)

初始化 ExpanderAutomationPeer 類別的新實例。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

屬性

ExpandCollapseState

取得 Expander.IsExpanded 屬性的值,並傳回 Expander 目前為展開或折迭。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

方法

Collapse()

隱藏控制項的內容區域。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

Expand()

顯示控制項的內容區域。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

適用於