ModelFactory.CreateItem Method (EditingContext, Object)

Creates a new model item by creating a deep copy of the specified object.

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, _
    item As Object _
) As ModelItem
public static ModelItem CreateItem(
    EditingContext context,
    Object item
)
public:
static ModelItem^ CreateItem(
    EditingContext^ context, 
    Object^ item
)
static member CreateItem : 
        context:EditingContext * 
        item:Object -> ModelItem 
public static function CreateItem(
    context : EditingContext, 
    item : Object
) : ModelItem

Parameters

  • item
    Type: System.Object
    An object representing the item to clone.

Return Value

Type: Microsoft.Windows.Design.Model.ModelItem
A ModelItem that represents the newly created item.

Exceptions

Exception Condition
ArgumentNullException

context or item is nulla null reference (Nothing in Visual Basic).

.NET Framework Security

See Also

Reference

ModelFactory Class

CreateItem Overload

Microsoft.Windows.Design.Model Namespace

Other Resources

WPF Designer Extensibility

Editing Model Architecture