DataGridTableStyle.ResetGridLineColor Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Восстанавливает значение по умолчанию свойства GridLineColor.
public:
void ResetGridLineColor();
public void ResetGridLineColor ();
member this.ResetGridLineColor : unit -> unit
Public Sub ResetGridLineColor ()
Примеры
В следующем примере кода демонстрируется использование этого элемента.
private:
void Button_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
{
// Change the 'GridLineColor'.
myDataTableStyle->GridLineColor = Color::Blue;
}
void Button1_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
{
// Reset the 'GridLineColor' to its orginal color.
myDataTableStyle->ResetGridLineColor();
}
private void Button_Click(object sender, EventArgs e)
{
// Change the 'GridLineColor'.
myDataTableStyle.GridLineColor = Color.Blue;
}
private void Button1_Click(object sender, EventArgs e)
{
// Reset the 'GridLineColor' to its orginal color.
myDataTableStyle.ResetGridLineColor();
}
Private Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs) Handles myButton.Click
' Change the 'GridLineColor'.
myDataTableStyle.GridLineColor = Color.Blue
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles myButton1.Click
' Reset the 'GridLineColor' to its orginal color.
myDataTableStyle.ResetGridLineColor()
End Sub
Комментарии
Этот метод обычно используется, если вы создаете конструктор для собственного DataGridTableStyle элемента управления или создаете собственный элемент управления, включающий .DataGridTableStyle С помощью ShouldSerializeGridLineColor метода можно определить, изменилось ли значение свойства по умолчанию.