ModelProperty ModelProperty ModelProperty ModelProperty Class

Definition

A ModelProperty represents a property on a ModelItem. Model properties are associated with an instance of an item, which allows them to have simple Value get/set properties instead of using the more cumbersome GetValue/SetValue mechanism of PropertyDescriptor.

public ref class ModelProperty abstract
public abstract class ModelProperty
type ModelProperty = class
Public MustInherit Class ModelProperty
Inheritance
ModelPropertyModelPropertyModelPropertyModelProperty

Remarks

The value of a ModelProperty may come from a locally set value, or it may be inherited from somewhere higher up in the element hierarchy. Use the Source property of the value returned by Value to determine the source of the property value.

Constructors

ModelProperty() ModelProperty() ModelProperty() ModelProperty()

Creates a new ModelProperty.

Properties

AttachedOwnerType AttachedOwnerType AttachedOwnerType AttachedOwnerType

Returns the type that defines this property if IsAttached returns true; otherwise, returns null.

Attributes Attributes Attributes Attributes

Returns the attributes declared on this property.

Collection Collection Collection Collection

Returns Value cast as a ModelItemCollection.

ComputedValue ComputedValue ComputedValue ComputedValue

Returns the currently computed value for this property. Setting a value on this property is the same as calling SetValue(Object), but can be used in data binding expressions.

Converter Converter Converter Converter

Returns the type converter to use with this property.

DefaultValue DefaultValue DefaultValue DefaultValue

Returns the default value for this property. If the property does not define a default value, this will return null.

Dictionary Dictionary Dictionary Dictionary

Returns Value cast as a ModelItemDictionary. If the property value is not a dictionary, this property will return null.

IsAttached IsAttached IsAttached IsAttached

Determines whether the property represents an attached property from a different type.

IsBrowsable IsBrowsable IsBrowsable IsBrowsable

Determines whether the property can be shown in a property window.

IsCollection IsCollection IsCollection IsCollection

Determines whether the value contained in the property is a ModelItemCollection.

IsDictionary IsDictionary IsDictionary IsDictionary

Determines whether the value contained in the property is a ModelItemDictionary.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Determines whether the property is read only.

IsSet IsSet IsSet IsSet

Determines whether the value of the property is set locally.

Name Name Name Name

Gets the name of this property.

Parent Parent Parent Parent

Returns the parent of this property.

PropertyType PropertyType PropertyType PropertyType

Returns the data type of the property.

Value Value Value Value

Returns the value set into this property.

Methods

ClearValue() ClearValue() ClearValue() ClearValue()

Clears the local value for the property.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines the equality for properties. Properties are equal if they have the same name and parent.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as a hash function for a ModelProperty.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetValue(Object) SetValue(Object) SetValue(Object) SetValue(Object)

Sets a local value on a property.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Operators

Equality(ModelProperty, ModelProperty) Equality(ModelProperty, ModelProperty) Equality(ModelProperty, ModelProperty) Equality(ModelProperty, ModelProperty)

Determines whether the properties are equal. Properties are equal if they have the same name and parent.

Inequality(ModelProperty, ModelProperty) Inequality(ModelProperty, ModelProperty) Inequality(ModelProperty, ModelProperty) Inequality(ModelProperty, ModelProperty)

Determines whether the properties are unequal. Properties are equal if they have the same name and parent.

Applies to