Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight 3
Grid Class
Grid Properties
 ShowGridLines Property
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Silverlight 3

Other versions are also available for the following:
.NET Framework Class Library for Silverlight
Grid..::.ShowGridLines Property

Gets or sets a value that indicates whether grid lines are visible within this Grid.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
Visual Basic (Declaration)
Public Property ShowGridLines As Boolean
    Get
    Set
Visual Basic (Usage)
Dim instance As Grid
Dim value As Boolean

value = instance.ShowGridLines

instance.ShowGridLines = value
C#
public bool ShowGridLines { get; set; }
XAML Attribute Usage
<grid ShowGridLines="bool"/>

Property Value

Type: System..::.Boolean
true 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.

Shows a Grid with ShowGridLines set to True

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.

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker