Back to Devexpress

DiagramItem.Stroke Property

wpf-devexpress-dot-xpf-dot-diagram-dot-diagramitem-389499f4.md

latest3.4 KB
Original Source

DiagramItem.Stroke Property

Gets or sets the brush used to paint the diagram item outline. This is a dependency property.

Namespace : DevExpress.Xpf.Diagram

Assembly : DevExpress.Xpf.Diagram.v25.2.dll

NuGet Package : DevExpress.Wpf.Diagram

Declaration

csharp
[Browsable(false)]
public Brush Stroke { get; set; }
vb
<Browsable(False)>
Public Property Stroke As Brush

Property Value

TypeDescription
Brush

A Brush object, that specifies how the diagram item outline is painted.

|

Remarks

Diagram themes are predefined sets of diagram item styles that can be applied to a diagram in a single click. Each theme consists of font settings and a set of styles that can be applied to individual diagram items. Styles are a combination of background, foreground and stroke colors used to paint an item.

The DevExpress.Diagram.Core.DiagramThemeColorId enumeration stores identifiers of theme colors. Use the StrokeId property to get or set the theme color of the item’s outline. The BackgroundId property specifies the color of the item’s background.

Use the Stroke property to paint the diagram item’s outline with a custom brush.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Stroke property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-diagram-use-diagramdatabindingbehavior-to-generate-diagram-from-collection/CS/DiagramDataBindingBehavior/MainWindow.xaml#L22

xml
</dxdiag:DiagramShape>
<dxdiag:DiagramShape Anchors="Left, Top" Angle="0" Background="Transparent" CanAttachConnectorBeginPoint="False" CanResize="False" CanEdit="False" CanCopyWithoutParent="False" CanChangeParent="False" CanMove="False" CanAttachConnectorEndPoint="False" CanSelect="False" CanDeleteWithoutParent="False" CanRotate="False" ForegroundId="Black_3" FontFamily="Arial" Height="25" Position="11,37.5" Stroke="Transparent" StrokeThickness="0" TextAlignment="Left" Width="176">
    <dxdiag:DiagramShape.Bindings>

See Also

Background

DiagramItem Class

DiagramItem Members

DevExpress.Xpf.Diagram Namespace