Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions wpf/Diagram/Gridlines.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ documentation: ug

# Gridlines in WPF Diagram (SfDiagram)

**Gridlines** are crisscross lines drawn in diagram page like the lines on traditional graph paper. It helps to position the diagram elements on the diagram page.
[Gridlines](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.Gridlines.html) are crisscross lines drawn in diagram page like the lines on traditional graph paper. It helps to position the diagram elements on the diagram page.

The [`SnapConstraints`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SnapSettings.html#Syncfusion_UI_Xaml_Diagram_SnapSettings_SnapConstraints) property of SnapSettings class allows you to control the visibility of the gridlines.

Expand Down Expand Up @@ -106,6 +106,8 @@ public class Gridlinestyle : List<Style>

![Snap to Gridlines](Gridlines_images/CustomGridlines.png)

Find the [Gridlines Styling Sample](https://github.com/SyncfusionExamples/WPF-Diagram-Examples/tree/master/Samples/Gridlines/GridlineStyle) to customize the Gridlines appearance.

## Change grid spacing

The thickness and space between the gridlines can be customized by using [`LinesInterval`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.Gridlines.html#Syncfusion_UI_Xaml_Diagram_Gridlines_LinesInterval) property of Gridlines class. The `LinesInterval` is a type of List<double> collection, where the values at the odd indexes are referred as thickness of the lines and the values at the even indexes are referred as space between the gridlines.
Expand Down Expand Up @@ -176,10 +178,10 @@ public class Intervals : List<double>

![Snap to Gridlines](Gridlines_images/LineIntervals.png)

Find the [Gridlines sample](https://github.com/SyncfusionExamples/WPF-Diagram-Examples/tree/master/Samples/Gridlines) to depict the Gridlines.
Find the [Gridlines Custom Spacing Sample](https://github.com/SyncfusionExamples/WPF-Diagram-Examples/tree/master/Samples/Gridlines/GridlineCustomSpacing) to customize the Gridlines spacing.

## See Also

[How to snap the objects on gridlines](/wpf/diagram/snapping/definesnapping)
[How to snap the objects on gridlines?](/wpf/diagram/snapping/definesnapping)

[How to customize the appearance of the gridlines?](https://support.syncfusion.com/kb/article/7414/how-to-customize-the-appearance-of-gridlines-in-wpf-diagram-sfdiagram)
Binary file modified wpf/Diagram/Gridlines_images/LineIntervals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.