Udostępnij za pośrednictwem


DataGrid.GridLineColor Właściwość

Definicja

Pobiera lub ustawia kolor linii siatki.

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

Wartość właściwości

Color

Element Color reprezentujący kolor linii siatki. Wartość domyślna to kolor systemu kontrolek (Control).

Wyjątki

Wartość nie jest ustawiona.

Przykłady

Poniższy przykład kodu ustawia kolor linii siatki przy użyciu wartości przekazanej do metody.

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

Uwagi

Nie jest wyświetlany wiersz siatki, jeśli właściwość jest ustawiona GridLineStyle na DataGridLineStyle.None.

Dotyczy

Zobacz też