Back to Devexpress

DiagramCustomGetSerializableItemPropertiesEventArgs.CreateProxyProperty<TProperty>(String, Func<IDiagramItem, TProperty>, Action<IDiagramItem, TProperty>, IEnumerable<Attribute>) Method

windowsforms-devexpress-dot-xtradiagram-dot-diagramcustomgetserializableitempropertieseventargs-dot-a-a-x.md

latest3.4 KB
Original Source

DiagramCustomGetSerializableItemPropertiesEventArgs.CreateProxyProperty<TProperty>(String, Func<IDiagramItem, TProperty>, Action<IDiagramItem, TProperty>, IEnumerable<Attribute>) Method

Allows you to create a custom property descriptor.

Namespace : DevExpress.XtraDiagram

Assembly : DevExpress.XtraDiagram.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
public PropertyDescriptor CreateProxyProperty<TProperty>(
    string name,
    Func<IDiagramItem, TProperty> getter,
    Action<IDiagramItem, TProperty> setter,
    IEnumerable<Attribute> attributes = null
)
vb
Public Function CreateProxyProperty(Of TProperty)(
    name As String,
    getter As Func(Of IDiagramItem, TProperty),
    setter As Action(Of IDiagramItem, TProperty),
    attributes As IEnumerable(Of Attribute) = Nothing
) As PropertyDescriptor

Parameters

NameTypeDescription
nameString

A string value that is the property’s name.

| | getter | Func<DevExpress.Diagram.Core.IDiagramItem, TProperty> |

A System.Func object specifying the function of the property getter.

| | setter | Action<DevExpress.Diagram.Core.IDiagramItem, TProperty> |

A System.Func object specifying the function of the property setter.

|

Optional Parameters

NameTypeDefaultDescription
attributesIEnumerable<Attribute>null

A collection of property attributes.

|

Type Parameters

Name
TProperty

Returns

TypeDescription
PropertyDescriptor

A property descriptor that can be added to the Properties collection.

|

Remarks

Use the CreateProxyProperty method to serialize properties that are not defined directly at the diagram item level. This can be useful when your diagram is bound to a data source and you need to edit data item properties.

See Also

DiagramCustomGetSerializableItemPropertiesEventArgs Class

DiagramCustomGetSerializableItemPropertiesEventArgs Members

DevExpress.XtraDiagram Namespace