Edit

Share via


ModelFactory.CreateItem Method

Definition

Creates a new ModelItem for the given item type.

Overloads

CreateItem(EditingContext, Object)

Creates a new ModelItem by creating a deep copy of the instance provided.

CreateItem(EditingContext, Type, Object[])

Creates a new ModelItem for the given item type.

CreateItem(EditingContext, Type, CreateOptions, Object[])

Creates a new ModelItem for the given item type.

CreateItem(EditingContext, Object)

Creates a new ModelItem by creating a deep copy of the instance provided.

public:
 static System::Activities::Presentation::Model::ModelItem ^ CreateItem(System::Activities::Presentation::EditingContext ^ context, System::Object ^ item);
public static System.Activities.Presentation.Model.ModelItem CreateItem (System.Activities.Presentation.EditingContext context, object item);
static member CreateItem : System.Activities.Presentation.EditingContext * obj -> System.Activities.Presentation.Model.ModelItem
Public Shared Function CreateItem (context As EditingContext, item As Object) As ModelItem

Parameters

context
EditingContext

The designer's editing context.

item
Object

The ModelItem to clone.

Returns

The newly created ModelItem.

Applies to

CreateItem(EditingContext, Type, Object[])

Creates a new ModelItem for the given item type.

public:
 static System::Activities::Presentation::Model::ModelItem ^ CreateItem(System::Activities::Presentation::EditingContext ^ context, Type ^ itemType, ... cli::array <System::Object ^> ^ arguments);
public static System.Activities.Presentation.Model.ModelItem CreateItem (System.Activities.Presentation.EditingContext context, Type itemType, params object[] arguments);
static member CreateItem : System.Activities.Presentation.EditingContext * Type * obj[] -> System.Activities.Presentation.Model.ModelItem
Public Shared Function CreateItem (context As EditingContext, itemType As Type, ParamArray arguments As Object()) As ModelItem

Parameters

context
EditingContext

The designer's editing context.

itemType
Type

The type of the ModelItem to create.

arguments
Object[]

An optional array of arguments that should be passed to the constructor of the item.

Returns

The newly created ModelItem.

Applies to

CreateItem(EditingContext, Type, CreateOptions, Object[])

Creates a new ModelItem for the given item type.

public:
 static System::Activities::Presentation::Model::ModelItem ^ CreateItem(System::Activities::Presentation::EditingContext ^ context, Type ^ itemType, System::Activities::Presentation::Model::CreateOptions options, ... cli::array <System::Object ^> ^ arguments);
public static System.Activities.Presentation.Model.ModelItem CreateItem (System.Activities.Presentation.EditingContext context, Type itemType, System.Activities.Presentation.Model.CreateOptions options, params object[] arguments);
static member CreateItem : System.Activities.Presentation.EditingContext * Type * System.Activities.Presentation.Model.CreateOptions * obj[] -> System.Activities.Presentation.Model.ModelItem
Public Shared Function CreateItem (context As EditingContext, itemType As Type, options As CreateOptions, ParamArray arguments As Object()) As ModelItem

Parameters

context
EditingContext

The designer's editing context.

itemType
Type

The type of the ModelItem to create.

options
CreateOptions

A set of options used when creating the item.

arguments
Object[]

An optional array of arguments that should be passed to the constructor of the item.

Returns

The newly created ModelItem.

Applies to