DataGridTableStyle.ResetAlternatingBackColor Metoda

Definice

AlternatingBackColor Obnoví vlastnost na výchozí hodnotu.

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

Příklady

Následující příklad kódu ukazuje použití tohoto člena.

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

Poznámky

Tuto metodu obvykle používáte, pokud vytváříte návrháře pro DataGridTableStyle nebo vytváříte vlastní ovládací prvek zahrnující DataGridTableStyle. Pomocí metody můžete ShouldSerializeAlternatingBackColor určit, zda se hodnota vlastnosti změnila z výchozí hodnoty.

Platí pro