DataDrivenAdapterBase.RegisterEventListener Method (String, String, EventHandler)
Facilitates explicit data-driven adapter event listener registration.
Namespace: Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter
Assembly: Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter (in Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter.dll)
Usage
'Usage
Dim instance As DataDrivenAdapterBase
Dim eventName As String
Dim controlName As String
Dim listenerCallback As EventHandler(Of ControlChangedEventArgs)
Dim returnValue As Boolean
returnValue = instance.RegisterEventListener(eventName, controlName, listenerCallback)
Syntax
'Declaration
Public Overridable Function RegisterEventListener ( _
eventName As String, _
controlName As String, _
listenerCallback As EventHandler(Of ControlChangedEventArgs) _
) As Boolean
public virtual bool RegisterEventListener (
string eventName,
string controlName,
EventHandler<ControlChangedEventArgs> listenerCallback
)
public:
virtual bool RegisterEventListener (
String^ eventName,
String^ controlName,
EventHandler<ControlChangedEventArgs^>^ listenerCallback
)
public boolean RegisterEventListener (
String eventName,
String controlName,
EventHandler<ControlChangedEventArgs> listenerCallback
)
public function RegisterEventListener (
eventName : String,
controlName : String,
listenerCallback : EventHandler<ControlChangedEventArgs>
) : boolean
Parameters
- eventName
Specifies the name of the event.
- controlName
Specifies the name of the control. Event listener registration can be scoped at the data-driven adapter control level (specify blank or null to omit).
- listenerCallback
Specifies the callback associated with the listener.
Return Value
Returns true if the registration was successful (duplicate registration attempts should return false).
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | eventName and listenerCallback must not be null. |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
See Also
Reference
DataDrivenAdapterBase Class
DataDrivenAdapterBase Members
Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter Namespace
Unified Service Desk
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.