Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Collapse]Ribbon, Bars and Menu
   [Expand]Bars
   [Expand]Ribbon
   [Expand]Popup Menus
    Radial Menu
   [Collapse]Common Features
    [Expand]Appearance and Look and Feel
    [Expand]Galleries
     Stub Glyphs
     The List of Bar Items and Links
   [Expand]Examples
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Stub Glyphs

Bar items and their links display images and string captions. Images are assigned by using the following properties.

When none of these properties are specified, links to bar items will, by default, display stub glyphs instead. A stub glyph is a colored square with rounded corners and one or two of the initial letters of the item caption. These fake icons are primarily used to quickly identify icons that have no icons as yet so you won't miss them. The figure below illustrates a sample.

Expanded Enable Stub Glyphs

You can enable stub glyphs for all item links within a Ribbon (toolbars), or for individual links only. To enable stub glyphs for all items at once, access the BarManager.OptionsStubGlyphs or RibbonControl.OptionsStubGlyphs properties section and set the StubGlyphOptions.AllowStubGlyphs property to DefaultBoolean.True or DefaultBoolean.Default.

Individual items provide the BarItem.AllowStubGlyph properties that, when not set to DefaultBoolean.Default, override the global setting. For example, the following figure illustrates the "Cut" bar item link that displays a stub glyph while other links don't.

Expanded Customize Stub Glyphs

The BarManager.OptionsStubGlyphs and RibbonControl.OptionsStubGlyphs sections provide multiple properties to customize the appearance of item stub glyphs.

Property

Description

StubGlyphOptions.CaseMode Allows you to choose the case mode for captions within stub glyphs. Accepts the following values of the GlyphTextCaseMode enumerator.
  • UpperCase - all glyph caption characters are in the upper case.
  • LowerCase - all glyph caption characters are in the lower case.
  • SentenceCase or Default - the first glyph caption character is in the upper case, the second one is in the lower case.

StubGlyphOptions.ColorMode By default, each stub glyph is painted using a random color from six available colors. You can utilize this property to explicitly choose one specific color for all stub glyphs.

StubGlyphOptions.CornerRadius Specifies the corner radius for rectangular stub glyphs (see the "Type" property). Set this property to 0 for straight square icons.

StubGlyphOptions.Font Specifies the font settings for stub glyphs' caption strings. The following figure illustrates glyph captions painted using the bold "Segoe Condensed" font.

StubGlyphOptions.HorizontalAlignment
StubGlyphOptions.VerticalAlignment
Two properties that allow you to arrange stub glyph captions into one of nine predefined positions.

StubGlyphOptions.LetterCount Stub glyph captions always start with the first character of their related bar item captions. Set this property to GlyphTextSymbolCount.Two to draw the second character as well. Displaying two characters requires more space and thus, is primarily recommended for large bar item links.

StubGlyphOptions.Padding Gets or sets the distance between glyph borders and inner text content.

StubGlyphOptions.RandomizeColors Gets or sets whether different variations of the same hue are enabled.

StubGlyphOptions.Type Switches between rectangular and circular stub glyphs. For rectangular glyphs, you can additionally specify the StubGlyphOptions.CornerRadius property.

How would you rate this topic?​​​​​​​