Aracılığıyla paylaş


DataGridTableStyle.ResetGridLineColor Yöntem

Tanım

Özelliği varsayılan değerine sıfırlar GridLineColor .

public:
 void ResetGridLineColor();
public void ResetGridLineColor ();
member this.ResetGridLineColor : unit -> unit
Public Sub ResetGridLineColor ()

Örnekler

Aşağıdaki kod örneğinde bu üyenin kullanımı gösterilmektedir.

private:
   void Button_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      // Change the 'GridLineColor'.
      myDataTableStyle->GridLineColor = Color::Blue;
   }

   void Button1_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      // Reset the 'GridLineColor' to its orginal color.
      myDataTableStyle->ResetGridLineColor();
   }

private void Button_Click(object sender, EventArgs e)
{
     // Change the 'GridLineColor'.
     myDataTableStyle.GridLineColor = Color.Blue;
}

private void Button1_Click(object sender, EventArgs e)
{
   // Reset the 'GridLineColor' to its orginal color.
    myDataTableStyle.ResetGridLineColor();
}
 Private Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs) Handles myButton.Click
     ' Change the 'GridLineColor'.
     myDataTableStyle.GridLineColor = Color.Blue
 End Sub

 Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles myButton1.Click
     ' Reset the 'GridLineColor' to its orginal color.
     myDataTableStyle.ResetGridLineColor()
 End Sub

Açıklamalar

için DataGridTableStyle bir tasarımcı oluşturuyorsanız veya öğesini birleştiren DataGridTableStylekendi denetiminizi oluşturuyorsanız genellikle bu yöntemi kullanırsınız. Özellik değerinin ShouldSerializeGridLineColor varsayılan değerden değişip değişmediğini belirlemek için yöntemini kullanabilirsiniz.

Şunlara uygulanır