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
- context
Type: Microsoft.Windows.Design.EditingContext
An EditingContext representing the designer's editing context
- 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
- 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