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]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

How To: Localize Bar and Ribbon Skin Items

To rename Bar skin sub-menu items and Ribbon skin gallery items, you can iterate through each container and modify its items manually. The alternate approach to customize skin menus is to utilize a Localizer object. 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. Set a new instance of your custom class as the currently used bar localizer. To do so, use the static BarLocalizer.Active property. The best place to call this method is the Program class, before the Application.Run method call.

  3. Run the application to see the result.

Important

If your 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 have their default captions. To make the localizer work, re-initialize your skin items by calling static SkinHelper.InitSkinPopupMenu and SkinHelpber.InitSkinGallery methods.

Expanded See Also

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