Gets or sets the brush used for painting the diagram background.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
C#
![]() |
---|
public Brush BackBrush { get; set; } |
Visual Basic
![]() |
---|
Public Property BackBrush As Brush |
An instance of a System.Windows.Media.Brush-derived class. The default is a solid brush initialized with Color.FromArgb(170, 170, 200).
This property enables more spectacular background painting with effects such as gradients, textures and color patterns.
The following sample paints the WpfDiagram's background with a gradient brush:
C#
![]() |
---|
private void diagram_Loaded(object sender, RoutedEventArgs e) { diagram.BackBrush = new LinearGradientBrush( Colors.LightBlue, Colors.LightCyan, 30); } |
Visual Basic
![]() |
---|
Private Sub diagram_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) diagram.BackBrush = New LinearGradientBrush( _ Colors.LightBlue, Colors.LightCyan, 30) End Sub |
WpfDiagram Programmer's Guide | © 2025 MindFusion |