Hi,
The xamColorPicker holds several strings. Only 4 of them are configurable captions. How to localize the other text ressources?
Thanks in advance
Great, thanks.
I got a feeling that there is one string not reflected: as you press the "Advanced" button the new popup has a caption "Advanced" which does not appear to be covered by any of the string properties in AdvancedColorShadePicker
What am I missing?
Thanks
You can add the following namespace in CodeBehind for the AdvancedColorShadePicker control:
using Infragistics.Controls.Editors.Primitives;
You may also consider using the following style instead of the Loaded event:
<Grid.Resources>
<Style TargetType="{x:Type igPrim:AdvancedColorShadePicker}">
<Setter Property="OKCaption" Value="Okey"/>
<Setter Property="GreenCaption" Value="Select Green Color"/>
<Setter Property="RedCaption" Value="Select Red Color"/>
..
</Style>
</Grid.Resources>
If you have any questions, please let me know.
To clarify: I now have this code in place for XamColorPicker and needed the same for AdvancedColorShadePicker
EventManager.RegisterClassHandler(typeof(Infragistics.Controls.Editors.XamColorPicker), Window.LoadedEvent, new RoutedEventHandler(OnXamColorPickerLoaded));
Unfortunately I can't attach the event handler in XAML -> I needed the C# namespace of AdvancedColorShadePicker. Where would I find it?
The XamColorPicker exposes five properties to customize the default resource strings:
- AdvancedButtonCaption
- CurrentPaletteCaption
- CurrentColorCaption
- DerivedColorPalettesCaption
- RecentColorPaletteCaption
However, when you click on the Advanced button there is another control generated in a Popup called AdvancedColorShadePicker. It exposes few more caption properties that you can customize like OKCaption, RedCaption, GreenCaption etc.
In order to create a style for this control in XAML you need to add the following namespace:
xmlns:igPrim="http://schemas.infragistics.com/xaml/primitives"
One option is to create a style for the AdvancedColorShadePicker and set directly these captions properties as a setters or use the approach from my previous post.
Let me know if you have any questions with this matter.