DataGridTableStyle.ResetSelectionForeColor 메서드

정의

SelectionForeColor 속성을 기본값으로 다시 설정합니다.

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

예제

다음 코드 예제에서는이 멤버를 사용 하는 방법을 보여 줍니다.

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

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

// Reset selection fore color to default.
customersStyle->ResetSelectionForeColor();
myString = String::Concat( myString, "  to " );
myString = String::Concat( myString, customersStyle->SelectionForeColor );

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

설명

일반적으로 디자이너를 만들거나 컨트롤을 통합하는 고유한 컨트롤을 DataGridTableStyle 만드는 경우 이 메서드를 DataGridTableStyle사용합니다. 이 메서드를 ShouldSerializeSelectionForeColor 사용하여 속성 값이 기본값에서 변경되었는지 여부를 확인할 수 있습니다.

적용 대상

추가 정보