Share via


DataGridTableStyle.ResetAlternatingBackColor Yöntem

Tanım

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

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

Örnekler

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

private:
   void myButton1_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      //Set the 'AlternatingBackColor'.
      myDataGridTableStyle->AlternatingBackColor = Color::Blue;
   }

   void myButton2_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      // Reset the 'AlternatingBackColor'.
      myDataGridTableStyle->ResetAlternatingBackColor();
   }
private void myButton1_Click(object sender,EventArgs e)
{
   //Set the 'AlternatingBackColor'.
   myDataGridTableStyle.AlternatingBackColor=Color.Blue;
}
private void myButton2_Click(object sender,EventArgs e)
{
   // Reset the 'AlternatingBackColor'.
   myDataGridTableStyle.ResetAlternatingBackColor();
}
Private Sub myButton1_Click(sender As Object, e As EventArgs)
   'Set the 'AlternatingBackColor'.
   myDataGridTableStyle.AlternatingBackColor = Color.Blue
End Sub

Private Sub myButton2_Click(sender As Object, e As EventArgs)
   ' Reset the 'AlternatingBackColor'.
   myDataGridTableStyle.ResetAlternatingBackColor()
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 ShouldSerializeAlternatingBackColor varsayılan değerden değişip değişmediğini belirlemek için yöntemini kullanabilirsiniz.

Şunlara uygulanır