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

適用於