Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2395
Localization?
posted

Hi,

 

The xamColorPicker holds several strings. Only 4 of them are configurable captions. How to localize the other text ressources?

 

Thanks in advance

Parents
  • 9836
    posted

    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!

Reply Children