DataGridTableStyle.ResetHeaderFont Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Resets the HeaderFont property to its default value.
public:
void ResetHeaderFont();
public void ResetHeaderFont ();
member this.ResetHeaderFont : unit -> unit
Public Sub ResetHeaderFont ()
Examples
The following code example demonstrates the use of this member.
private:
void MySetButton_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
{
// Set the 'HeaderFont' property of the DataGridTableStyle instance.
myTableStyle->HeaderFont = gcnew System::Drawing::Font( "Impact",10 );
// Add the DataGridTableStyle instance to the GridTableStylesCollection.
myDataGrid->TableStyles->Add( myTableStyle );
}
void MyResetButton_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
{
// Reset the Header Font to its default value.
myTableStyle->ResetHeaderFont();
}
private void MySetButton_Click(object sender, EventArgs e)
{
// Set the 'HeaderFont' property of the DataGridTableStyle instance.
myTableStyle.HeaderFont=new Font("Impact",10);
// Add the DataGridTableStyle instance to the GridTableStylesCollection.
myDataGrid.TableStyles.Add(myTableStyle);
}
private void MyResetButton_Click(object sender, EventArgs e)
{
// Reset the Header Font to its default value.
myTableStyle.ResetHeaderFont();
}
Private Sub MySetButton_Click(ByVal sender As Object, ByVal e As EventArgs)
' Set the 'HeaderFont' property of DataGridTableStyle instance.
myTableStyle.HeaderFont = New Font("Impact", 10)
' Add the DataGridTableStyle instance to the GridTableStylesCollection.
myDataGrid.TableStyles.Add(myTableStyle)
End Sub
Private Sub MyResetButton_Click(ByVal sender As Object, ByVal e As EventArgs)
' Reset the Header Font to its default value.
myTableStyle.ResetHeaderFont()
End Sub
Remarks
You typically use this method if you are either creating a designer for the DataGridTableStyle or creating your own control incorporating the DataGridTableStyle.
Applies to
See also
Berkolaborasi dengan kami di GitHub
Sumber untuk konten ini dapat ditemukan di GitHub, yang juga dapat Anda gunakan untuk membuat dan meninjau masalah dan menarik permintaan. Untuk informasi selengkapnya, lihat panduan kontributor kami.
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk