Hi,
The xamColorPicker holds several strings. Only 4 of them are configurable captions. How to localize the other text ressources?
Thanks in advance
You can configure the other captions using the code below:
XAML:
<Grid> <Grid.Resources> <Style TargetType="{x:Type igPrim:AdvancedColorShadePicker}"> <Style.Setters> <EventSetter Event="Loaded" Handler="acsp_Loaded"/> </Style.Setters> </Style> </Grid.Resources> <ig:XamColorPicker Width="100" Height="30" x:Name="cp"/> </Grid>
CodeBehind:
void acsp_Loaded(object sender, RoutedEventArgs e) { AdvancedColorShadePicker colorPicker = sender as AdvancedColorShadePicker; if (null != colorPicker) { colorPicker.OKCaption = "Okey"; colorPicker.RedCaption = "Select Red Color"; colorPicker.GreenCaption = "Select Green Color";
} }
Hope this helps!
Sorry, I'm not sure I follow:
a) I was referring to the type XamColorPicker and not AdvancedColorShadePicker
b) where would I find the namespace "igPrim"?
Could you please elaborate?
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.
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?
This header should be covered by the DialogCaption property of the XamColorPicker (check the TextBlock element in the HeaderElem control in the template). However, it seems there is an issue with the DialogCaption property.
I've created a support ticket with a reference number of CAS-57062-LF2K4J and will write up this issue in our system for a fix. I will be getting back to you with an issue id on e-mail that you may use to track the progress of this issue.
Thank you for reporting this issue.
Sorry, I was unable to find a DialogCaption property in neither XamColorPicker nor AdvancedColorShadePicker. Where exactly would I find it?
I just got the confirmation as you placed a support ticket. I now understand that this property is just not available at this time. Thanks for clarification.
I'm leaving the reference number of the issue here in case anyone encounters this and wants to subscribe for status updates.
#61273: DialogCaption property is not available in XamColorPicker
Thank you for pointing this out.