Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​ComponentModel.​PropertyDescriptor

Assembly: System.ComponentModel.TypeConverter

Inheritance: object → MemberDescriptor → PropertyDescriptor

Provides an abstraction of a property on a class.

Properties

public Type
ComponentType
When overridden in a derived class, gets the type of the component this property is bound to.
public TypeConverter
Converter
Gets the type converter for this property.
public TypeConverter
ConverterFromRegisteredType
Gets the type converter for this property.
public bool
IsLocalizable
Gets a value indicating whether this property should be localized, as specified in the <see cref="T:System.ComponentModel.LocalizableAttribute" /> .
public bool
IsReadOnly
When overridden in a derived class, gets a value indicating whether this property is read-only.
public Type
PropertyType
When overridden in a derived class, gets the type of the property.
SerializationVisibility
Gets a value indicating whether this property should be serialized, as specified in the <see cref="T:System.ComponentModel.DesignerSerializationVisibilityAttribute" /> .
public bool
SupportsChangeEvents
Gets a value indicating whether value change notifications for this property may originate from outside the property descriptor.
protected Attribute[]
AttributeArray
Gets or sets an array of attributes.
Attributes
Gets the collection of attributes for this member.
public string
Category
Gets the name of the category to which the member belongs, as specified in the <see cref="T:System.ComponentModel.CategoryAttribute" /> .
public string
Description
Gets the description of the member, as specified in the <see cref="T:System.ComponentModel.DescriptionAttribute" /> .
public bool
DesignTimeOnly
Gets whether this member should be set only at design time, as specified in the <see cref="T:System.ComponentModel.DesignOnlyAttribute" /> .
public string
DisplayName
Gets the name that can be displayed in a window, such as a Properties window.
public bool
IsBrowsable
Gets a value indicating whether the member is browsable, as specified in the <see cref="T:System.ComponentModel.BrowsableAttribute" /> .
public string
Name
Gets the name of the member.
protected int
NameHashCode
Gets the hash code for the name of the member, as specified in <see cref="M:System.String.GetHashCode" /> .

Methods

public void
AddValueChanged​(object component, EventHandler handler)
Enables other objects to be notified when this property changes.
component The component to add the handler for.
handler The delegate to add as a listener.
public bool
CanResetValue​(object component)
When overridden in a derived class, returns whether resetting an object changes its value.
Returns <see langword="true" /> if resetting the component changes its value; otherwise, <see langword="false" /> .
component The component to test for reset capability.
protected object
CreateInstance​(Type type)
Creates an instance of the specified type.
Returns A new instance of the type.
type A <see cref="T:System.Type" /> that represents the type to create.
public bool
Equals​(object obj)
Compares this to another object to see if they are equivalent.
Returns <see langword="true" /> if the values are equivalent; otherwise, <see langword="false" /> .
obj The object to compare to this <see cref="T:System.ComponentModel.PropertyDescriptor" /> .
protected void
FillAttributes​(Collections.​IList attributeList)
Adds the attributes of the <see cref="T:System.ComponentModel.PropertyDescriptor" /> to the specified list of attributes in the parent class.
attributeList An <see cref="T:System.Collections.IList" /> that lists the attributes in the parent class. Initially, this is empty.
GetChildProperties​()
Returns the default <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> .
Returns A collection of property descriptor.
GetChildProperties​(Attribute[] filter)
Returns a <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> using a specified array of attributes as a filter.
Returns A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> with the properties that match the specified attributes.
filter An array of type <see cref="T:System.Attribute" /> to use as a filter.
GetChildProperties​(object instance)
Returns a <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> for a given object.
Returns A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> with the properties for the specified component.
instance A component to get the properties for.
GetChildProperties​(object instance, Attribute[] filter)
Returns a <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> for a given object using a specified array of attributes as a filter.
Returns A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> with the properties that match the specified attributes for the specified component.
instance A component to get the properties for.
filter An array of type <see cref="T:System.Attribute" /> to use as a filter.
public object
GetEditor​(Type editorBaseType)
Gets an editor of the specified type.
Returns An instance of the requested editor type, or <see langword="null" /> if an editor cannot be found.
editorBaseType The base type of editor, which is used to differentiate between multiple editors that a property supports.
public int
GetHashCode​()
Returns the hash code for this object.
Returns The hash code for this object.
protected object
GetInvocationTarget​(Type type, object instance)
This method returns the object that should be used during invocation of members.
Returns The <see cref="T:System.Object" /> that should be used during invocation of members.
type The <see cref="T:System.Type" /> of the invocation target.
instance The potential invocation target.
protected Type
GetTypeFromName​(string typeName)
Returns a type using its name.
Returns A <see cref="T:System.Type" /> that matches the given type name, or <see langword="null" /> if a match cannot be found.
typeName The assembly-qualified name of the type to retrieve.
public object
GetValue​(object component)
When overridden in a derived class, gets the current value of the property on a component.
Returns The value of a property for a given component.
component The component with the property for which to retrieve the value.
protected void
OnValueChanged​(object component, EventArgs e)
Raises the <c>ValueChanged</c> event that you implemented.
component The object that raises the event.
e An <see cref="T:System.EventArgs" /> that contains the event data.
public void
RemoveValueChanged​(object component, EventHandler handler)
Enables other objects to be notified when this property changes.
component The component to remove the handler for.
handler The delegate to remove as a listener.
public void
ResetValue​(object component)
When overridden in a derived class, resets the value for this property of the component to the default value.
component The component with the property value that is to be reset to the default value.
public void
SetValue​(object component, object value)
When overridden in a derived class, sets the value of the component to a different value.
component The component with the property value that is to be set.
value The new value.
public bool
ShouldSerializeValue​(object component)
When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.
Returns <see langword="true" /> if the property should be persisted; otherwise, <see langword="false" /> .
component The component with the property to be examined for persistence.
CreateAttributeCollection​()
Inherited from MemberDescriptor
Creates a collection of attributes using the array of attributes passed to the constructor.
Returns A new <see cref="T:System.ComponentModel.AttributeCollection" /> that contains the <see cref="P:System.ComponentModel.MemberDescriptor.AttributeArray" /> attributes.
protected void
Finalize​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object