Dela via


ModelItem.Name Property

When overridden in a derived class, gets or sets the name or ID of the item.

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

Syntax

'Declaration
Public MustOverride Property Name As String
'Usage
Dim instance As ModelItem 
Dim value As String 

value = instance.Name

instance.Name = value
public abstract string Name { get; set; }
public:
virtual property String^ Name {
    String^ get () abstract;
    void set (String^ value) abstract;
}
public abstract function get Name () : String 
public abstract function set Name (value : String)

Property Value

Type: System.String
A string representing the name of the item.

Remarks

Not all items need to have names, so this property may return nulla null reference (Nothing in Visual Basic). Also, depending on the type of item and where it is located in the hierarchy, it may not always be valid to set the name on an item. If this item's ItemType property declares a RuntimeNamePropertyAttribute, this Name property is a direct mapping to the property dictated by that attribute.

.NET Framework Security

See Also

Reference

ModelItem Class

ModelItem Members

Microsoft.Windows.Design.Model Namespace

Other Resources

WPF Designer Extensibility Architecture