DiagramItem.CustomStyleId Property

Specifies the key of a style to apply to the diagram item. This is a dependency property.

Namespace: DevExpress.Xpf.Diagram

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

Declaration

[Browsable(false)]
public object CustomStyleId { get; set; }
<Browsable(False)>
Public Property CustomStyleId As Object

Property Value

Type Description
Object

The key of a style applied to the item.

Remarks

Setting the CustomStyleId property is necessary to deserialize diagram items with custom content. See the example below.

Examples

The following example shows how to create diagram items that display custom content.

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Windows

Namespace DXDiagram.ContentItem
    Public Class ButtonItemModel
        Public Sub ShowMessage()
            MessageBox.Show("This command has been created by our POCO machanism based on the ShowMessage method")
        End Sub
    End Class
End Namespace

Implements

DevExpress.Diagram.Core.IDiagramItem.CustomStyleId
See Also