DataGridTableStyle.ResetForeColor メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


通常、DataGridTableStyle のデザイナを作成する場合、または DataGridTableStyle が組み込まれている独自のコントロールを作成する場合に、このメソッドを使用します。ShouldSerializeForeColor メソッドを使用して、プロパティの値が既定値から変更されたかどうかを判断します。

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 'BtnSetForeColor_Click 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 'BtnResetForeColor_Click
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: 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(); }
void BtnSetForeColor_Click(Object sender, EventArgs e) { // Set the foreground color of table. myDataGridTableStyle.set_ForeColor(Color.get_Blue()); myDataGrid.get_TableStyles().Add(myDataGridTableStyle); } //BtnSetForeColor_Click void BtnResetForeColor_Click(Object sender, EventArgs e) { // Reset the foreground color of table to its default value. myDataGridTableStyle.ResetForeColor(); } //BtnResetForeColor_Click

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- DataGridTableStyle.ResetForeColor メソッドのページへのリンク