Site Map | About Us | Contact Us  
 The same content in Microsoft HTML help file format is included in the download package.

ElementStyle.Font Property

Gets the font of an UI element.

[Visual Basic]
Public ReadOnly Property Font As FontInfo
[C#]
public FontInfo Font {get;}

Remarks

This property gets FontInfo object which wraps up font-related CSS attributes. Here is an example of using this property to set font-related CSS attributes.

[C#] 
    // Get a menu look item
    MenuItem lookItem;
    lookItem = Menu1.ItemLooks.GetItemByID("default");
    
    // Set the look item's normal style font to bold.
    // All the menu items that uses this look item will have bold font in normal state.
    lookItem.NormalStyle.Font.Bold = true;
    
    
[Visual Basic.NET] 
' Get a menu look item
Dim lookItem as MenuItem
lookItem = Menu1.ItemLooks.GetItemByID("default")
' Set the look item's normal style font to bold.

' All the menu items that uses this look item will have bold font in normal state.
lookItem.NormalStyle.Font.Bold = true
FontInfo

See Also

ElementStyle Class | EO.Web Namespace | FontInfo


Direct link to this topic