PropertyValueUIHandler Delegate
Represents the method that adds a delegate to an implementation of IPropertyValueUIService.
Assembly: System.Drawing (in System.Drawing.dll)
'Declaration Public Delegate Sub PropertyValueUIHandler ( _ context As ITypeDescriptorContext, _ propDesc As PropertyDescriptor, _ valueUIItemList As ArrayList _ ) 'Usage Dim instance As New PropertyValueUIHandler(AddressOf HandlerMethod)
Parameters
- context
- Type: System.ComponentModel.ITypeDescriptorContext
An ITypeDescriptorContext that can be used to obtain context information.
- propDesc
- Type: System.ComponentModel.PropertyDescriptor
A PropertyDescriptor that represents the property being queried.
- valueUIItemList
- Type: System.Collections.ArrayList
An ArrayList of PropertyValueUIItem objects containing the UI items associated with the property.
When this delegate is invoked, it can add a PropertyValueUIItem containing UI items for the specified property to the ArrayList passed as the valueUIItemList parameter.
This following code example demonstrates creating a PropertyValueUIHandler event handler method that provides PropertyValueUIItem objects for any properties named HorizontalMargin or VerticalMargin.
' PropertyValueUIHandler delegate that provides PropertyValueUIItem ' objects to any properties named HorizontalMargin or VerticalMargin. Private Sub marginPropertyValueUIHandler(ByVal context As System.ComponentModel.ITypeDescriptorContext, ByVal propDesc As System.ComponentModel.PropertyDescriptor, ByVal itemList As ArrayList) ' 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") Then Dim img As Image = DeserializeFromBase64Text(imageBlob1) itemList.Add(New PropertyValueUIItem(img, New PropertyValueUIItemInvokeHandler(AddressOf Me.marginInvoke), "Test ToolTip")) End If If propDesc.DisplayName.Equals("VerticalMargin") Then Dim img As Image = DeserializeFromBase64Text(imageBlob1) img.RotateFlip(RotateFlipType.Rotate90FlipNone) itemList.Add(New PropertyValueUIItem(img, New PropertyValueUIItemInvokeHandler(AddressOf Me.marginInvoke), "Test ToolTip")) End If End Sub
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.