Skip to main content
A newer version of this page is available. .

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.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Diagram, DevExpress.Wpf.Diagram

Declaration

[Browsable(false)]
public object CustomStyleId { get; set; }

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.

Example

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

View Example

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
See Also