Gets or sets the brush used for painting the diagram background.
Namespace: MindFusion.Diagramming.Avalonia
Assembly: MindFusion.Diagramming.Avalonia
SyntaxC#
Copy Code
|
|---|
public IBrush BackBrush { get; set; } |
Visual Basic
Copy Code
|
|---|
Public Property BackBrush As IBrush |
An instance of an Avalonia.Media.IBrush -derived class. The default is a solid brush initialized with Color.FromArgb(170, 170, 200).
RemarksThis property enables more spectacular background painting with effects such as gradients, textures and color patterns.
ExampleThe 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