Xceed Grid for WinForms v4.3 Documentation
Font Property (HeaderFooterElement)
Example 


Xceed.Grid.Reporting.v4.3 Assembly > Xceed.Grid.Reporting Namespace > HeaderFooterElement Class : Font Property
Gets or sets the font of the HeaderFooterElement.
Syntax
'Declaration
 
<DescriptionAttribute("The font of this part of the header or footer.")>

<CategoryAttribute("Appearance")>

<LocalizableAttribute(True)>

<XmlIgnoreAttribute()>

<DefaultValueAttribute("")>

Public Property Font As Font
'Usage
 
Dim instance As HeaderFooterElement

Dim value As Font

 

instance.Font = value

 

value = instance.Font
[Description("The font of this part of the header or footer.")]

[Category("Appearance")]

[Localizable(true)]

[XmlIgnore()]

[DefaultValue("")]

public Font Font {get; set;}

Property Value

A reference to a System.Drawing.Font object representing the font to use. If a null reference (Nothing in Visual Basic), then the parent HeaderFooter's font is used. By default, a null reference (Nothing in Visual Basic).
Remarks

Because the System.Drawing.Font object is immutable (meaning that you cannot adjust any of its properties), you can only assign the Font property a new Font object. However, you can base the new font on the existing font.

Example
The following example demonstrates how to adjust the font of a HeaderFooterElement to make it bold:
headerFooter.LeftElement.Font = New Font( headerFooter.LeftElement.Font, headerFooter.LeftElement.Font.Style Or FontStyle.Bold )
headerFooter.LeftElement.Font = new Font( headerFooter.LeftElement.Font, headerFooter.LeftElement.Font.Style | FontStyle.Bold );
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

HeaderFooterElement Class
HeaderFooterElement Members