| LayoutSerializerOnCreateInstance Method (Type, XElement) |
Called when a game instance needs to be created.
Namespace: DigitalRune.Game.UIAssembly: DigitalRune.Game.UI (in DigitalRune.Game.UI.dll) Version: 1.8.0.0 (1.8.0.14553)
Syntax protected virtual Object OnCreateInstance(
Type type,
XElement element
)
Protected Overridable Function OnCreateInstance (
type As Type,
element As XElement
) As Object
protected:
virtual Object^ OnCreateInstance(
Type^ type,
XElement^ element
)
abstract OnCreateInstance :
type : Type *
element : XElement -> Object
override OnCreateInstance :
type : Type *
element : XElement -> Object
Parameters
- type
- Type: SystemType
The type of the object. - element
- Type: System.Xml.LinqXElement
The XML node with data for the instance.
Return Value
Type:
ObjectA new instance of the
type.
Remarks
Per default, the parameterless constructor of type is invoked. This
method can be overridden in derived classes to support types that do not have a
parameterless default constructor or that require a special initialization.
See Also