PropertyValueUIItem Class


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Provides information about a property displayed in the Properties window, including the associated event handler, pop-up information string, and the icon to display for the property.

Namespace:   System.Drawing.Design
Assembly:  System.Drawing (in System.Drawing.dll)


[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
public class PropertyValueUIItem

System_CAPS_pubmethodPropertyValueUIItem(Image, PropertyValueUIItemInvokeHandler, String)

Initializes a new instance of the PropertyValueUIItem class.


Gets the 8 x 8 pixel image that will be drawn in the Properties window.


Gets the handler that is raised when a user double-clicks this item.


Gets or sets the information string to display for this item.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Resets the user interface (UI) item.


Returns a string that represents the current object.(Inherited from Object.)

The following code example provides a PropertyValueUIItem object for any properties of the component named HorizontalMargin or VerticalMargin. The PropertyValueUIItem for these properties provides an image, a ToolTip, and an event handler that displays a message box when the image for the property is clicked. This code example is part of a larger example provided for the IPropertyValueUIService interface.

// PropertyValueUIHandler delegate that provides PropertyValueUIItem
// objects to any properties named HorizontalMargin or VerticalMargin.
private void marginPropertyValueUIHandler(System.ComponentModel.ITypeDescriptorContext context, System.ComponentModel.PropertyDescriptor propDesc, ArrayList itemList)
    // A PropertyValueUIHandler added to the IPropertyValueUIService
    // is queried once for each property of a component and passed
    // a PropertyDescriptor that represents the characteristics of 
    // the property when the Properties window is set to a new 
    // component. A PropertyValueUIHandler can determine whether 
    // to add a PropertyValueUIItem for the object to its ValueUIItem 
    // list depending on the values of the PropertyDescriptor.
    if( propDesc.DisplayName.Equals( "HorizontalMargin" ) )
        Image img = DeserializeFromBase64Text(imageBlob1);
        itemList.Add( new PropertyValueUIItem( img, new PropertyValueUIItemInvokeHandler(this.marginInvoke), "Test ToolTip") );
    if( propDesc.DisplayName.Equals( "VerticalMargin" ) )
        Image img = DeserializeFromBase64Text(imageBlob1);
        itemList.Add( new PropertyValueUIItem( img, new PropertyValueUIItemInvokeHandler(this.marginInvoke), "Test ToolTip") );


for full access to system resources. Demand values: LinkDemand, InheritanceDemand. Associated state:

.NET Framework
Available since 1.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top