Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Collapse]Build an Application
  [Expand]Choose Application UI
   Data Management Controls
  [Expand]Printing and Exporting
  [Expand]WinForms MVVM
  [Collapse]Skins
    Add and Customize the Toolbar and Menu Skin Selector
    Add and Customize the Ribbon Gallery Skin Selector
    Build a Custom End-User Skin Selector
    How To: Localize Bar and Ribbon Skin Items
    Bonus and Custom Skin Registration
    Design-Time Skinning
  [Expand]Localization
  [Expand]Right-to-Left Layout
   Redistribution and Deployment
 [Expand]Controls and Libraries
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core 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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How To: Localize Bar and Ribbon Skin Items

You can utilize a Localizer object to customize skin menus, instead of iterating through each Bar skin sub-menu item and Ribbon skin gallery item container to manually modify the items. This approach allows you to customize skin items in all existing bar sub-menus and Ribbon galleries at once.

  1. Create a BarLocalizer class descendant and override its virtual XtraLocalizer<T>.GetLocalizedString method.

  2. Use the static BarLocalizer.Active property to set a new instance of your custom class as the current bar localizer. Call this method in the Program class before the Application.Run method call, as shown below.

  3. Run the application to see the result.

Important

If the custom localizer is assigned after a bar skin sub item, or if the Ribbon skin gallery is already initialized (e.g., on the Load event), skin items will display default captions. In this case, call static SkinHelper.InitSkinPopupMenu and SkinHelpber.InitSkinGallery methods to initialize skin items again and activate the localizer.

Expanded See Also

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