ModelService.CreateItem Method (Type, CreateOptions, array<Object )
When overridden in a derived class, creates a ModelItem object for a specified type.
Namespace: Microsoft.Windows.Design.Services
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Protected MustOverride Function CreateItem ( _
itemType As Type, _
options As CreateOptions, _
ParamArray arguments As Object() _
) As ModelItem
protected abstract ModelItem CreateItem(
Type itemType,
CreateOptions options,
params Object[] arguments
)
protected:
virtual ModelItem^ CreateItem(
Type^ itemType,
CreateOptions options,
... array<Object^>^ arguments
) abstract
abstract CreateItem :
itemType:Type *
options:CreateOptions *
arguments:Object[] -> ModelItem
protected abstract function CreateItem(
itemType : Type,
options : CreateOptions,
... arguments : Object[]
) : ModelItem
Parameters
- itemType
Type: System.Type
The type of item to create.
- options
Type: Microsoft.Windows.Design.Model.CreateOptions
Creation options. You can specify if you want to initialize default values for an item.
- arguments
Type: array<System.Object[]
An array of arguments to pass to the constructor of the item.
Return Value
Type: Microsoft.Windows.Design.Model.ModelItem
A newly created model item.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | itemType is nulla null reference (Nothing in Visual Basic). |
Remarks
The ModelFactory class calls the CreateItem method when the user creates a new item.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Services Namespace