Udostępnij za pośrednictwem


ElementPropertyDescriptor Class

Definition

ElementPropertyDescriptor. Provide a PropertyDescriptor implementation over IMS DomainProperties.

public ref class ElementPropertyDescriptor : System::ComponentModel::PropertyDescriptor
[System.Diagnostics.DebuggerDisplay("Name = {Name}, Type = {PropertyType}")]
public class ElementPropertyDescriptor : System.ComponentModel.PropertyDescriptor
[<System.Diagnostics.DebuggerDisplay("Name = {Name}, Type = {PropertyType}")>]
type ElementPropertyDescriptor = class
    inherit PropertyDescriptor
Public Class ElementPropertyDescriptor
Inherits PropertyDescriptor
Inheritance
ElementPropertyDescriptor
Derived
Attributes

Constructors

ElementPropertyDescriptor(ElementTypeDescriptor, ModelElement, DomainPropertyInfo, Attribute[])

The ElementPropertyDescriptor can operate upon a specific element passed in to the constructor, or it can accept a null element.

If a specific element is provided, GetValue(), SetValue(), and the other methods don't need the component argument passed in and can instead use that specific element.

If a null element is provided, GetValue(), SetValue(), and the other methods will use the component argument passed in.

ElementPropertyDescriptor(ModelElement, DomainPropertyInfo, Attribute[])

The ElementPropertyDescriptor can operate upon a specific element passed in to the constructor, or it can accept a null element.

If a specific element is provided, GetValue(), SetValue(), and the other methods don't need the component argument passed in and can instead use that specific element.

If a null element is provided, GetValue(), SetValue(), and the other methods will use the component argument passed in.

Properties

Category

Gets the name of the category to which the member belongs, as specified in the CategoryAttribute.

ComponentType

The type of component the framework expects for this property. Notice this returns element.GetType(). That is because the object that is being browsed when this property is shown is an ModelElement. So we are faking the PropertyGrid into thinking this is a property on that type, even though it isn't.

Converter

Gets the type converter of the property descriptor.

Description

Gets the description of the member, as specified in the DescriptionAttribute.

DisplayName

Gets the name that can be displayed in a window, such as a Properties window.

DomainPropertyInfo

DomainPropertyInfo for this propery

IsInstanceBased

Test if this PropertyDescriptor is based on an instance or a static type.

IsReadOnly

We have to override all the abstract members.

ModelElement

returns the element to which this property belongs

PropertyType

Returns the property type.

Methods

AddValueChanged(Object, EventHandler)
CanResetValue(Object)

This is not a resettable property.

CanSetProperty(ModelElement, DomainPropertyInfo)
GetEditor(Type)

Gets an editor of the specified type. Override this so we can provide our own FlagEnumerationEditor for bit-wisable enum

GetElementPropertyDescriptor(ModelElement, DomainPropertyInfo)

Gets the ElementPropertyDescriptor given a ModelElement and DomainPropertyInfo.

GetSetValueTransactionName(String)

Gets a string describing the set field action.

GetValue(Object)

Get the value of the property...

RemoveValueChanged(Object, EventHandler)
ResetValue(Object)

Reset domain propertyvalue to the default based on the default of the domain.

SetProperty(ModelElement, DomainPropertyInfo, Object)

Set the property value. Property value is generally set via an ElementPropertyDescriptor. It will be set directly via the SetValue method on propertyInfo if

  • IsBrowsable attribute is set to false on propertyInfo and ElementPropertyDescriptor is not found.
SetValue(Object, Object)

Sets the value of the property.

ShouldSerializeValue(Object)

Allow the property to be reported as bold in the property browser

Applies to