DataGrid.ResetHeaderFont Método

Definición

Restablece el valor predeterminado de la propiedad HeaderFont.Resets the HeaderFont property to its default value.

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

Ejemplos

En el ejemplo de código siguiente se muestra el uso de este miembro.The following code example demonstrates the use of this member.

private:
   // Set the header font to Arial with size 20.
   void button6_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      myDataGrid->HeaderFont = gcnew System::Drawing::Font( "Arial",20 );
   }

   // Reset the header font.
   void button5_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      myDataGrid->ResetHeaderFont();
   }
// Set the header font to Arial with size 20.
private void button6_Click(object sender, EventArgs e)
{
   myDataGrid.HeaderFont = new Font("Arial", 20);
}
// Reset the header font.
private void button5_Click(object sender, EventArgs e)
{
   myDataGrid.ResetHeaderFont();
}
' Set the header font to Arial with size 20.
Private Sub button6_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button6.Click
    myDataGrid.HeaderFont = New Font("Arial", 20)
End Sub

' Reset the header font.
Private Sub button5_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button5.Click
    myDataGrid.ResetHeaderFont()
End Sub

Comentarios

Normalmente, este método se usa si se crea un diseñador para el System.Windows.Forms.DataGrid o si se crea un control propio que incorpore el 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. Puede usar el método ShouldSerializeHeaderFont para determinar si el valor de la propiedad ha cambiado respecto a su valor predeterminado.You can use the ShouldSerializeHeaderFont method to determine whether the property value has changed from its default.

Se aplica a