本文整理匯總了VB.NET中System.Windows.Automation.Provider.AutomationInteropProvider.RaiseStructureChangedEvent方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET AutomationInteropProvider.RaiseStructureChangedEvent方法的具體用法?VB.NET AutomationInteropProvider.RaiseStructureChangedEvent怎麽用?VB.NET AutomationInteropProvider.RaiseStructureChangedEvent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。
在下文中一共展示了AutomationInteropProvider.RaiseStructureChangedEvent方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: OnStructureChangeAdd
''' <summary>
''' Responds to an addition to the UI Automation tree structure by raising an event.
''' </summary>
''' <param name="list">
''' The list to which the item was added.
''' </param>
''' <remarks>
''' For the runtime Id of the item, pass 0 because the provider cannot know
''' what its actual runtime Id is.
''' </remarks>
Public Shared Sub OnStructureChangeAdd(ByVal list As CustomListControl)
If AutomationInteropProvider.ClientsAreListening Then
Dim fakeRuntimeId(1) As Integer
fakeRuntimeId(0) = 0
Dim args As New StructureChangedEventArgs( _
StructureChangeType.ChildrenBulkAdded, fakeRuntimeId)
AutomationInteropProvider.RaiseStructureChangedEvent( _
CType(list.Provider, IRawElementProviderSimple), args)
End If
End Sub
''' <summary>
''' Responds to a removal from the UI Automation tree structure by raising an event.
''' </summary>
''' <param name="list">
''' The list from which the item was removed.
''' </param>
''' <remarks>
''' For the runtime Id of the list, pass 0 because the provider cannot know
''' what its actual runtime ID is.
''' </remarks>
Public Shared Sub OnStructureChangeRemove(ByVal list As CustomListControl)
If AutomationInteropProvider.ClientsAreListening Then
Dim fakeRuntimeId(1) As Integer
fakeRuntimeId(0) = 0
Dim args As New StructureChangedEventArgs( _
StructureChangeType.ChildrenBulkRemoved, fakeRuntimeId)
AutomationInteropProvider.RaiseStructureChangedEvent( _
CType(list.Provider, IRawElementProviderSimple), args)
End If
End Sub
開發者ID:VB.NET開發者,項目名稱:System.Windows.Automation.Provider,代碼行數:44,代碼來源:AutomationInteropProvider.RaiseStructureChangedEvent