DropDownButtonAutomationPeer 類別

定義

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

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

/// [Microsoft.UI.Xaml.MUXContractProperty(version=7)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
class DropDownButtonAutomationPeer : ButtonAutomationPeer, IExpandCollapseProvider
[Microsoft.UI.Xaml.MUXContractProperty(version=7)]
[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 DropDownButtonAutomationPeer : ButtonAutomationPeer, IExpandCollapseProvider
Public Class DropDownButtonAutomationPeer
Inherits ButtonAutomationPeer
Implements IExpandCollapseProvider
繼承
DropDownButtonAutomationPeer
屬性
Microsoft.UI.Xaml.MUXContractPropertyAttribute MarshalingBehaviorAttribute ThreadingAttribute VersionAttribute
實作

備註

提示

WinUI 3 資源庫WinUI 2 資源庫應用程式包含大部分 WinUI 3 和 WinUI 2 控制項、特性和功能的互動式範例。

如果已安裝,請按一下下列連結加以開啟: WinUI 3 資源庫WinUI 2 資源庫

如果未安裝,您可以從 Microsoft Store 下載 WinUI 3 資源庫WinUI 2 資源庫

您也可以從 GitHub 取得的原始程式碼 (使用 WinUI 3 的主要 分支和 WinUI 2) 的 winui2 分支。

建構函式

DropDownButtonAutomationPeer(DropDownButton)

初始化 Microsoft.UI.Xaml.Controls.DropDownButtonAutomationPeer 類別的新實例。

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

屬性

ExpandCollapseState

取得控制項的狀態,可能為展開或摺疊。

本檔適用于 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命名空間) 。

適用於