ModelFactory.CreateItem Method (EditingContext, TypeIdentifier, CreateOptions, array<Object )
Creates a new model item for the specified type identifier.
Namespace: Microsoft.Windows.Design.Model
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public Shared Function CreateItem ( _
context As EditingContext, _
typeIdentifier As TypeIdentifier, _
options As CreateOptions, _
ParamArray arguments As Object() _
) As ModelItem
public static ModelItem CreateItem(
EditingContext context,
TypeIdentifier typeIdentifier,
CreateOptions options,
params Object[] arguments
)
public:
static ModelItem^ CreateItem(
EditingContext^ context,
TypeIdentifier typeIdentifier,
CreateOptions options,
... array<Object^>^ arguments
)
static member CreateItem :
context:EditingContext *
typeIdentifier:TypeIdentifier *
options:CreateOptions *
arguments:Object[] -> ModelItem
public static function CreateItem(
context : EditingContext,
typeIdentifier : TypeIdentifier,
options : CreateOptions,
... arguments : Object[]
) : ModelItem
Parameters
- context
Type: Microsoft.Windows.Design.EditingContext
The designer's editing context.
- typeIdentifier
Type: Microsoft.Windows.Design.Metadata.TypeIdentifier
An identifier for the type of item to create.
- options
Type: Microsoft.Windows.Design.Model.CreateOptions
A set of create options to use when creating the item. The default is None.
- arguments
Type: array<System.Object[]
An optional array of arguments that should be passed to the constructor of the item.
Return Value
Type: Microsoft.Windows.Design.Model.ModelItem
A ModelItem that represents the newly created item type. This method might return nulla null reference (Nothing in Visual Basic) if the type identifier could not be resolved.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | context is nulla null reference (Nothing in Visual Basic). |
.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.Model Namespace