Share via


IUITechnologyManager.AddEventHandler Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Adds an event handler.

Namespace:  Microsoft.VisualStudio.TestTools.UITest.Extension
Assembly:  Microsoft.VisualStudio.TestTools.UITest.Extension (in Microsoft.VisualStudio.TestTools.UITest.Extension.dll)

Syntax

'Declaration
Function AddEventHandler ( _
    element As IUITechnologyElement, _
    eventType As UITestEventType, _
    eventSink As IUITestEventNotify _
) As Boolean
bool AddEventHandler(
    IUITechnologyElement element,
    UITestEventType eventType,
    IUITestEventNotify eventSink
)
bool AddEventHandler(
    IUITechnologyElement^ element, 
    UITestEventType eventType, 
    IUITestEventNotify^ eventSink
)
abstract AddEventHandler : 
        element:IUITechnologyElement * 
        eventType:UITestEventType * 
        eventSink:IUITestEventNotify -> bool
function AddEventHandler(
    element : IUITechnologyElement, 
    eventType : UITestEventType, 
    eventSink : IUITestEventNotify
) : boolean

Parameters

Return Value

Type: Boolean
true if the event type is supported and is successfully added; otherwise, false.

.NET Framework Security

See Also

Reference

IUITechnologyManager Interface

Microsoft.VisualStudio.TestTools.UITest.Extension Namespace

IUITechnologyElement

UITestEventType

IUITestEventNotify