Search
Diagram.BackBrush Property
See Also
 





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

Namespace: MindFusion.Diagramming.Avalonia
Assembly: MindFusion.Diagramming.Avalonia

 Syntax

C#  Copy Code

public IBrush BackBrush { get; set; }

Visual Basic  Copy Code

Public Property BackBrush As IBrush

 Property Value

An instance of an Avalonia.Media.IBrush -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 Diagram.Avalonia'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