本文整理汇总了C#中System.Windows.Automation.Peers.AutomationPeer.GetAutomationControlType方法的典型用法代码示例。如果您正苦于以下问题:C# AutomationPeer.GetAutomationControlType方法的具体用法?C# AutomationPeer.GetAutomationControlType怎么用?C# AutomationPeer.GetAutomationControlType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Automation.Peers.AutomationPeer
的用法示例。
在下文中一共展示了AutomationPeer.GetAutomationControlType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetControlType
private static ControlType GetControlType( AutomationPeer itemPeer )
{
switch( itemPeer.GetAutomationControlType() )
{
case AutomationControlType.Button:
return ControlType.Button;
case AutomationControlType.Calendar:
return ControlType.Calendar;
case AutomationControlType.CheckBox:
return ControlType.CheckBox;
case AutomationControlType.ComboBox:
return ControlType.ComboBox;
case AutomationControlType.Edit:
return ControlType.Edit;
case AutomationControlType.Hyperlink:
return ControlType.Hyperlink;
case AutomationControlType.Image:
return ControlType.Image;
case AutomationControlType.ListItem:
return ControlType.ListItem;
case AutomationControlType.List:
return ControlType.List;
case AutomationControlType.Menu:
return ControlType.Menu;
case AutomationControlType.MenuBar:
return ControlType.MenuBar;
case AutomationControlType.MenuItem:
return ControlType.MenuItem;
case AutomationControlType.ProgressBar:
return ControlType.ProgressBar;
case AutomationControlType.RadioButton:
return ControlType.RadioButton;
case AutomationControlType.ScrollBar:
return ControlType.ScrollBar;
case AutomationControlType.Slider:
return ControlType.Slider;
case AutomationControlType.Spinner:
return ControlType.Spinner;
case AutomationControlType.StatusBar:
return ControlType.StatusBar;
case AutomationControlType.Tab:
return ControlType.Tab;
case AutomationControlType.TabItem:
return ControlType.TabItem;
case AutomationControlType.Text:
return ControlType.Text;
case AutomationControlType.ToolBar:
return ControlType.ToolBar;
case AutomationControlType.ToolTip:
return ControlType.ToolTip;
case AutomationControlType.Tree:
return ControlType.Tree;
case AutomationControlType.TreeItem:
return ControlType.TreeItem;
case AutomationControlType.Custom:
return ControlType.Custom;
case AutomationControlType.Group:
return ControlType.Group;
case AutomationControlType.Thumb:
return ControlType.Thumb;
case AutomationControlType.DataGrid:
return ControlType.DataGrid;
case AutomationControlType.DataItem:
return ControlType.DataItem;
case AutomationControlType.Document:
return ControlType.Document;
case AutomationControlType.SplitButton:
return ControlType.SplitButton;
//.........这里部分代码省略.........