csharp System.Windows.Automation.AutomationElement.AutomationElementInformation类(方法)实例源码

下面列出了csharp System.Windows.Automation.AutomationElement.AutomationElementInformation 类(方法)源码代码实例,从而了解它的用法。

作者:.NET开发    项目:System.Windows.Automatio   
/// <summary>
/// Handles ElementSelected events by showing a message.
/// </summary>
/// <param name="src">Object that raised the event; in this case, a list item.</param>
/// <param name="e">Event arguments.</param>
private void OnSelect(object src, AutomationEventArgs e)
{
    // Get the name of the item, which is equivalent to its text.
    AutomationElement element = src as AutomationElement;
    if (element != null)
    {
        Console.WriteLine(element.Current.Name + " was selected.");
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号