DataGrid.GridLineColor 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定格線色彩。
public:
property System::Drawing::Color GridLineColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };
public System.Drawing.Color GridLineColor { get; set; }
member this.GridLineColor : System.Drawing.Color with get, set
Public Property GridLineColor As Color
屬性值
Color,代表格線色彩。 預設值為控制項系統色彩 (Control)。
例外狀況
這個值並未設定。
範例
下列程式碼範例會使用傳遞至 方法的值,設定格線的色彩。
private:
void SetGridLineColor(
DataGrid^ myGrid, System::Drawing::Color newcolor )
{
myGrid->GridLineColor = newcolor;
}
private void SetGridLineColor
(DataGrid myGrid, System.Drawing.Color newcolor)
{
myGrid.GridLineColor = newcolor;
}
Private Sub SetGridLineColor(myGrid As DataGrid, newcolor As System.Drawing.Color)
myGrid.GridLineColor = newcolor
End Sub
備註
如果 屬性設定為 DataGridLineStyle.None
, GridLineStyle 則不會顯示格線。