AutomationElement.AutomationElementInformation.ControlType 屬性

定義

取得項目的 ControlTypeGets the ControlType of the element.

public:
 property System::Windows::Automation::ControlType ^ ControlType { System::Windows::Automation::ControlType ^ get(); };
public System.Windows.Automation.ControlType ControlType { get; }
member this.ControlType : System.Windows.Automation.ControlType
Public ReadOnly Property ControlType As ControlType

屬性值

ControlType

這個項目的互動模型。The interaction model for this element. 預設值是 CustomThe default value is Custom.

備註

控制項型別描述任意消費者介面自動化元素的已知互動模型,而不需依賴當地語系化的控制項類型或複雜邏輯規則的組合。Control type describes a known interaction model for arbitrary UI Automation elements without relying on a localized control type or combination of complex logic rules.

這個屬性在執行時間可以變更的唯一情況是針對支援的控制項 MultipleViewPatternThe only case where this property can change at run time is for a control that supports MultipleViewPattern. 例如,Win32 ListView 控制項可以從變更 DataGridList ,視目前的視圖而定。An example is the Win32 ListView control, which can change from DataGrid to List, depending on the current view.

如需詳細資訊,請參閱ControlTypePropertyFor more information, see ControlTypeProperty.

適用於