All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

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

Allows you to create a custom property descriptor.

Namespace: DevExpress.Xpf.Diagram

Assembly: DevExpress.Xpf.Diagram.v20.1.dll

Declaration

public PropertyDescriptor CreateProxyProperty<TProperty>(
    string name,
    Func<IDiagramItem, TProperty> getter,
    Action<IDiagramItem, TProperty> setter,
    IEnumerable<Attribute> attributes = null
)
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

Name Type Description
name String

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

Name Type Default Description
attributes IEnumerable<Attribute>

null

A collection of property attributes.

Type Parameters

Name
TProperty

Returns

Type Description
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.

Implements

DevExpress.Diagram.Core.IDiagramCustomGetItemPropertiesEventArgs.CreateProxyProperty<TProperty>(String, Func<DevExpress.Diagram.Core.IDiagramItem, TProperty>, Action<DevExpress.Diagram.Core.IDiagramItem, TProperty>, IEnumerable<Attribute>)
See Also