DataGrid.ResetForeColor 메서드

정의

ForeColor 속성을 기본값으로 다시 설정합니다.Resets the ForeColor property to its default value.

public:
 override void ResetForeColor();
public override void ResetForeColor ();
override this.ResetForeColor : unit -> unit
Public Overrides Sub ResetForeColor ()

예제

다음 코드 예제에서는이 멤버를 사용 하는 방법을 보여 줍니다.The following code example demonstrates the use of this member.

// String variable used to show message.
String^ myString = "Selection backgound color changed from: ";

// Store current foreground color of selected cells.
Color myCurrentColor = myDataGrid->SelectionBackColor;
myString = String::Concat( myString, myCurrentColor.ToString() );

// Reset selection background color to default.
myDataGrid->ResetSelectionBackColor();
myString = String::Concat( myString, " to " );
myString = String::Concat( myString, myDataGrid->SelectionBackColor.ToString() );

// Show information about changes in color setting.  
MessageBox::Show( myString, "Selection background color information" );
// String variable used to show message.
string myString = "Selection backgound color changed from: ";
// Store current foreground color of selected cells.
Color myCurrentColor = myDataGrid.SelectionBackColor;
myString += myCurrentColor.ToString();
// Reset selection background color to default.
myDataGrid.ResetSelectionBackColor();
myString += "  to ";
myString += myDataGrid.SelectionBackColor.ToString();
// Show information about changes in color setting.  
MessageBox.Show(myString, "Selection background color information");
' String variable used to show message.
Dim myString As String = "Selection backgound color changed from: "
' Store current foreground color of selected cells.
Dim myCurrentColor As Color = myDataGrid.SelectionBackColor
myString += myCurrentColor.ToString()
' Reset selection background color to default.
myDataGrid.ResetSelectionBackColor()
myString += "  to "
myString += myDataGrid.SelectionBackColor.ToString()
' Show information about changes in color setting.  
MessageBox.Show(myString, "Selection background color information")

설명

일반적으로에 대 한 디자이너를 만들거나를 통합 하는 고유한 컨트롤을 만드는 경우이 메서드를 사용 System.Windows.Forms.DataGrid System.Windows.Forms.DataGrid 합니다.You typically use this method if you are either creating a designer for the System.Windows.Forms.DataGrid or creating your own control incorporating the System.Windows.Forms.DataGrid.

적용 대상

추가 정보