Search
Diagram.BackBrush Property
See Also
 





Gets or sets the brush used for painting the diagram background.

Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf

 Syntax

C#  Copy Code

public Brush BackBrush { get; set; }

Visual Basic  Copy Code

Public Property BackBrush As Brush

 Property Value

An instance of a System.Windows.Media.Brush-derived class. The default is a solid brush initialized with Color.FromArgb(170, 170, 200).

 Remarks

This property enables more spectacular background painting with effects such as gradients, textures and color patterns.

 Example

The following sample paints the WpfDiagram's background with a gradient brush:

C#  Copy Code
private void diagram_Loaded(object sender, RoutedEventArgs e)
{
    diagram.BackBrush = new LinearGradientBrush(
        Colors.LightBlue, Colors.LightCyan, 30);
}
Visual Basic  Copy Code
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

 See Also