Bagikan melalui


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.
  • 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

See Also

Reference

ModelService Class

CreateItem Overload

Microsoft.Windows.Design.Services Namespace

ModelItem

ModelFactory

Other Resources

Editing Model Architecture

WPF Designer Extensibility