DataGridTableStyle.ResetBackColor 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
BackColor 속성을 기본값으로 다시 설정합니다.
public:
void ResetBackColor();
public void ResetBackColor ();
member this.ResetBackColor : unit -> unit
Public Sub ResetBackColor ()
예제
다음 코드 예제에서는이 멤버를 사용 하는 방법을 보여 줍니다.
private:
void AddCustomColumnStyle()
{
// Set the TableStyle Mapping name.
myTableStyle->MappingName = "customerTable";
myTableStyle->BackColor = Color::Pink;
// Set the ColumnStyle properties and add to TableStyle.
myColumnStyle->MappingName = "Customers";
myColumnStyle->HeaderText = "Customer Name";
myColumnStyle->Width = 250;
myTableStyle->GridColumnStyles->Add( myColumnStyle );
myDataGrid->TableStyles->Add( myTableStyle );
}
void myButton1_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
{
// Reset the background color.
myTableStyle->ResetBackColor();
}
private void AddCustomColumnStyle()
{
// Set the TableStyle Mapping name.
myTableStyle.MappingName = "customerTable";
myTableStyle.BackColor = Color.Pink;
// Set the ColumnStyle properties and add to TableStyle.
myColumnStyle.MappingName = "Customers";
myColumnStyle.HeaderText = "Customer Name";
myColumnStyle.Width = 250;
myTableStyle.GridColumnStyles.Add(myColumnStyle);
myDataGrid.TableStyles.Add(myTableStyle);
}
private void myButton1_Click(object sender, EventArgs e)
{
// Reset the background color.
myTableStyle.ResetBackColor();
}
Private Sub AddCustomColumnStyle()
' Set the TableStyle Mapping name.
myTableStyle.MappingName = "customerTable"
myTableStyle.BackColor = Color.Pink
' Set the ColumnStyle properties and add to TableStyle.
myColumnStyle.MappingName = "Customers"
myColumnStyle.HeaderText = "Customer Name"
myColumnStyle.Width = 250
myTableStyle.GridColumnStyles.Add(myColumnStyle)
myDataGrid.TableStyles.Add(myTableStyle)
End Sub
Private Sub myButton1_Click(sender As Object, e As EventArgs)
' Reset the background color.
myTableStyle.ResetBackColor()
End Sub
설명
일반적으로 디자이너를 만들거나 컨트롤을 통합하는 고유한 컨트롤을 DataGridTableStyle 만드는 경우 이 메서드를 DataGridTableStyle사용합니다.