DataDrivenAdapterBase.RegisterEventListenerBase Method
Adds the specified listenerCallback to the internal list of registered listeners. Once registered, RaiseEvent can then be used to raise the event to the registered listeners.
Namespace: Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter
Assembly: Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter (in Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter.dll)
Usage
'Usage
Dim eventName As String
Dim controlName As String
Dim listenerCallback As EventHandler(Of ControlChangedEventArgs)
Dim returnValue As Boolean
returnValue = Me.RegisterEventListenerBase(eventName, controlName, listenerCallback)
Syntax
'Declaration
Protected Function RegisterEventListenerBase ( _
eventName As String, _
controlName As String, _
listenerCallback As EventHandler(Of ControlChangedEventArgs) _
) As Boolean
protected bool RegisterEventListenerBase (
string eventName,
string controlName,
EventHandler<ControlChangedEventArgs> listenerCallback
)
protected:
bool RegisterEventListenerBase (
String^ eventName,
String^ controlName,
EventHandler<ControlChangedEventArgs^>^ listenerCallback
)
protected boolean RegisterEventListenerBase (
String eventName,
String controlName,
EventHandler<ControlChangedEventArgs> listenerCallback
)
protected function RegisterEventListenerBase (
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 when registration was successful (duplicate registration attempts 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.