Creates a game object event for a UIControl. (This method replaces
CreateEvent<(Of <<'(T>)>>)(String, String, String, T) of the GameObject class.)
Namespace: DigitalRune.Game.UI.ControlsAssembly: DigitalRune.Game.UI (in DigitalRune.Game.UI.dll) Version: 1.1.0.0 (1.1.1.9392)
Syntax
| C# |
|---|
public static int CreateEvent<T>( Type ownerType, string name, string category, string description, T defaultEventArgs ) where T : EventArgs |
| Visual Basic |
|---|
Public Shared Function CreateEvent(Of T As EventArgs) ( _ ownerType As Type, _ name As String, _ category As String, _ description As String, _ defaultEventArgs As T _ ) As Integer |
| Visual C++ |
|---|
public: generic<typename T> where T : EventArgs static int CreateEvent( Type^ ownerType, String^ name, String^ category, String^ description, T defaultEventArgs ) |
Parameters
- ownerType
- Type: System..::..Type
The control type.
- name
- Type: System..::..String
The name of the event.
- category
- Type: System..::..String
The category of the event.
- description
- Type: System..::..String
The description of the event.
- defaultEventArgs
- Type: T
The default event arguments.
Type Parameters
- T
- The type of the event arguments.
Return Value
The ID of the created event.
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | ownerType is nullNothingnullptra null reference (Nothing in Visual Basic). |