Grid.ShowGridLines 属性

定义

获取或设置一个值,该值指示网格线在此 Grid 中是否可见。Gets or sets a value that indicates whether grid lines are visible within this Grid.

public:
 property bool ShowGridLines { bool get(); void set(bool value); };
public bool ShowGridLines { get; set; }
member this.ShowGridLines : bool with get, set
Public Property ShowGridLines As Boolean

属性值

Boolean

如果网格线可见,则为 true;否则为 falsetrue if grid lines are visible; otherwise, false. 默认值为 falseThe default value is false.

注解

启用网格线会围绕内的所有元素创建虚线 GridEnabling grid lines creates dotted lines around all the elements within a Grid. 只有虚线可用,因为此属性旨在用作调试布局问题的设计工具,不应在生产质量代码中使用。Only dotted lines are available because this property is intended as a design tool to debug layout problems and is not intended for use in production quality code. 如果需要中的行 Grid ,请将中的元素样式设置 Grid 为具有边框。If you want lines inside a Grid, style the elements within the Grid to have borders.

依赖项属性信息Dependency Property Information

标识符字段Identifier field ShowGridLinesProperty
元数据属性设置为 trueMetadata properties set to true None

适用于