Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

NuGet Package: 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