Window Forms Color Dialog Control Create custom color in C# to form with the Color Dialog in .NET applications Color Dialog Localizing in Windows Forms
The Kettic Color Dialog WinForm component offers the easy way to customize color to Form via choosing color from a color palette. This is a light weight user interface WinForms control and can be seamlessly integrated into other controls. RGB or HEX color models are available for choosing color. The color palette that can be themed as demand contains large flexibility to build custom color from the web, system, and basic colors. How to Localize Color Dialog Form
It is easy to localize the Color Dialog form by using the Color Dialog C# API. The following simple steps shows how to show text and messages in a local language.
- The C# classes used to localize are contained in the Kettic.WinForms.UI.Localize namespace
- Open your existing Windows Forms project or create a new Windows application.
- Create a descendant C# class of the ColorDialogLocalizeProvider class libray
- Override the method, GetLocalizedString(string id), and offer a translation to the label text and user messages.
- The default value of the method will be returned if a translation is not offered. Call the base method, GetLocalizedString, in the default clause of the switch statement to guarantee the behavior.
- The following is the sample that shows how to implement the customizing in C# project.
- Instantiate and assign custom localization provider to the current localization provider to apply the custom localization
ColorDialogLocalizeProvider.CurrentProvider = new CustomColorDialogLocalizeProvider();
|