Background Grid
You can control the background settings of the diagramming surface through the following properties:
- IsBackgroundSurfaceVisible: a boolean property that determines whether the background surface of the RadDiagram should be displayed. Its default value is true.
Set IsBackgroundSurfaceVisible
this.radDiagram1.DiagramElement.IsBackgroundSurfaceVisible = true;
Me.RadDiagram1.DiagramElement.IsBackgroundSurfaceVisible = True
IsBackgroundSurfaceVisible = true | IsBackgroundSurfaceVisible = false |
---|---|
- Background: this property is of type Brush and it controls the fill of the RadDiagram background.
Set Background
this.radDiagram1.DiagramElement.BackgroundGrid.Background = new System.Drawing.SolidBrush(Color.LightYellow);
Me.RadDiagram1.DiagramElement.BackgroundGrid.Background = New System.Drawing.SolidBrush(Color.LightYellow)
You can access the BackgroundGrid properties:
- CellSize: this property is of type Telerik.Windows.Diagrams.Core.Size and it controls the size of the cells in the RadDiagram surface. The default value of this property is a size of *20x20 * units.
Set CellSize
this.radDiagram1.DiagramElement.BackgroundGrid.CellSize = new Telerik.Windows.Diagrams.Core.Size(40, 40);
Me.RadDiagram1.DiagramElement.BackgroundGrid.CellSize = New Telerik.Windows.Diagrams.Core.Size(40, 40)
- LineStroke: this property is of type Brush and it specifies how the cells outline is painted.
Set LineStroke
this.radDiagram1.DiagramElement.BackgroundGrid.LineStroke = new System.Drawing.SolidBrush(Color.Red);
Me.RadDiagram1.DiagramElement.BackgroundGrid.LineStroke = New System.Drawing.SolidBrush(Color.Red)
- LineStrokeThickness: this property is of type double and it gets or sets the thickness of the RadDiagram background grid lines.
Set LineStrokeThickness
this.radDiagram1.DiagramElement.BackgroundGrid.LineStrokeThickness = 5;
Me.RadDiagram1.DiagramElement.BackgroundGrid.LineStrokeThickness = 5