Grid.ShowGridLines Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets a value that indicates whether grid lines are visible within this Grid.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<Grid ShowGridLines="bool"/>
Property Value
Type: System.Booleantrue if grid lines are visible; otherwise, false. The default value is false.
Dependency property identifier field: ShowGridLinesProperty
Enabling grid lines creates dotted lines around all the elements within a Grid, as shown in the following illustration.

Only dotted lines are available because this property is intended as a design tool to debug layout problems. Setting ShowGridLines to true is not intended for use in production-quality code. If you want lines inside a Grid, style the elements within the Grid to have borders. For more information, see Border.