Share via


ModelService.CreateStaticMemberItem Method

When overridden in a derived class, creates a new model item that represents the value of a static member of the specified class.

Namespace:  Microsoft.Windows.Design.Services
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Protected MustOverride Function CreateStaticMemberItem ( _
    type As Type, _
    memberName As String _
) As ModelItem
protected abstract ModelItem CreateStaticMemberItem(
    Type type,
    string memberName
)
protected:
virtual ModelItem^ CreateStaticMemberItem(
    Type^ type, 
    String^ memberName
) abstract
abstract CreateStaticMemberItem : 
        type:Type * 
        memberName:string -> ModelItem 
protected abstract function CreateStaticMemberItem(
    type : Type, 
    memberName : String
) : ModelItem

Parameters

  • type
    Type: System.Type
    The type that contains the static member being referenced.
  • memberName
    Type: System.String
    The name of the static member being referenced.

Return Value

Type: Microsoft.Windows.Design.Model.ModelItem
A newly created model item that represents a static member of type.

Remarks

The CreateStaticMemberItem method creates a new model item that represents the value of a static member of type. For example, to add a reference to Brushes.Red to the model, call this method with typeof(Brushes) and the string "Red". This item is serialized into the following XAML.

[xaml]

{x:Static Brushes.Red}

.NET Framework Security

See Also

Reference

ModelService Class

Microsoft.Windows.Design.Services Namespace

ModelItem

ViewService

DesignerView

ContextItemManager

Other Resources

Editing Model Architecture

WPF Designer Extensibility