DataGridTableStyle.ResetHeaderForeColor 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 HeaderForeColor property to its default value.
public:
void ResetHeaderForeColor();
public void ResetHeaderForeColor ();
member this.ResetHeaderForeColor : unit -> unit
Public Sub ResetHeaderForeColor ()
Examples
The following code example demonstrates the use of this member.
private:
void myButton1_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
{
// Set the 'HeaderForeColor' property.
myDataTableStyle->HeaderForeColor = Color::Blue;
}
void myButton2_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
{
// Reset the 'HeaderForeColor' property to its default value.
myDataTableStyle->ResetHeaderForeColor();
}
private void myButton1_Click(object sender, EventArgs e)
{
// Set the 'HeaderForeColor' property.
myDataTableStyle.HeaderForeColor = Color.Blue;
}
private void myButton2_Click(object sender, EventArgs e)
{
// Reset the 'HeaderForeColor' property to its default value.
myDataTableStyle.ResetHeaderForeColor();
}
Private Sub myButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
' Set the 'HeaderForeColor' property.
myDataTableStyle.HeaderForeColor = Color.Blue
End Sub
Private Sub myButton2_Click(ByVal sender As Object, ByVal e As EventArgs)
' Reset the 'HeaderForeColor' property to its default value.
myDataTableStyle.ResetHeaderForeColor()
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 ShouldSerializeHeaderForeColor method to determine whether the property value has changed from its default.