vb System.Windows.Automation.SelectionItemPattern.SelectionContainerProperty类(方法)实例源码

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

作者:VB.NET开发    项目:System.Windows.Automatio   
'''--------------------------------------------------------------------
''' <summary>
''' Retrieves the selection items for a selection container.
''' </summary>
''' <param name="rootElement">
''' The automation element from which to start searching.
''' </param>
''' <param name="selectionContainer">
''' An automation element that supports SelectionPattern.
''' </param>
''' <returns>
''' A collection of automation elements satisfying 
''' the specified condition(s).
''' </returns>
'''--------------------------------------------------------------------
Private Function FindElementBasedOnContainer( _
ByVal rootElement As AutomationElement, _
ByVal selectionContainer As AutomationElement) As AutomationElementCollection
    Dim containerCondition As PropertyCondition = _
        New PropertyCondition( _
        SelectionItemPattern.SelectionContainerProperty, _
        selectionContainer)
    Dim selectionItems As AutomationElementCollection = _
        rootElement.FindAll(TreeScope.Descendants, containerCondition)
    Return selectionItems
End Function


问题


面经


文章

微信
公众号

扫码关注公众号