DataGridTableStyle.ResetForeColor 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 ForeColor property to its default value.
public:
void ResetForeColor();
public void ResetForeColor ();
member this.ResetForeColor : unit -> unit
Public Sub ResetForeColor ()
Examples
The following code example demonstrates the use of this member.
private:
void BtnSetForeColor_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
{
// Set the foreground color of table.
myDataGridTableStyle->ForeColor = Color::Blue;
myDataGrid->TableStyles->Add( myDataGridTableStyle );
}
void BtnResetForeColor_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
{
// Reset the foreground color of table to its default value.
myDataGridTableStyle->ResetForeColor();
}
private void BtnSetForeColor_Click(Object sender, EventArgs e)
{
// Set the foreground color of table.
myDataGridTableStyle.ForeColor=Color.Blue;
myDataGrid.TableStyles.Add(myDataGridTableStyle);
}
private void BtnResetForeColor_Click(Object sender, EventArgs e)
{
// Reset the foreground color of table to its default value.
myDataGridTableStyle.ResetForeColor();
}
Private Sub BtnSetForeColor_Click(ByVal sender As Object, ByVal e As EventArgs)
' Set the foreground color of table.
myDataGridTableStyle.ForeColor = Color.Blue
myDataGrid.TableStyles.Add(myDataGridTableStyle)
End Sub
Private Sub BtnResetForeColor_Click(ByVal sender As Object, ByVal e As EventArgs)
' Reset the foreground color of table to its default value.
myDataGridTableStyle.ResetForeColor()
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 ShouldSerializeForeColor method to determine whether the property value has changed from its default.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기