DataGridTableStyle.ResetAlternatingBackColor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Resets the AlternatingBackColor property to its default value.
public:
void ResetAlternatingBackColor();
public void ResetAlternatingBackColor ();
member this.ResetAlternatingBackColor : unit -> unit
Public Sub ResetAlternatingBackColor ()
Examples
The following code example demonstrates the use of this member.
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
Remarks
You typically use this method if you are either creating a designer for the DataGridTableStyle or creating your own control incorporating the DataGridTableStyle. You can use the ShouldSerializeAlternatingBackColor method to determine whether the property value has changed from its default.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈