This is a migrated thread and some comments may be shown as answers.

How can I localize the Clear Content Button?

2 Answers 34 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 04 May 2010, 02:47 AM
Hi,

I was just wondering how would I localize the clear content button? (Preferably in XAML)

2 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 04 May 2010, 07:59 AM
Hello Alexander,

RadComboBox has a property named ClearSelectionButtonContent, that should be of help:
http://demos.telerik.com/silverlight/#ComboBox/Configurator

All the best,
Valeri Hristov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Alex
Top achievements
Rank 1
answered on 05 May 2010, 03:47 AM
Hi Valeri,

That method shown works fine, however I'm hoping to find a more reusable solution. As this is a feature that I will probably use in all text boxes and they will all have the same clear selection text (and each will consequently have to be localized)

Is there any way to set it to use some "global" setting?



I've tried several different methods but can't seem to find a good solution. i.e.
I've tried using a style to apply a static resource but that doesn't work
<Setter Property="ClearSelectionButtonContent" Value="{Binding Source={StaticResource MyControlStrings}, Path=ClearSelectionButtonContent, Mode=OneTime}"/> 

Similarly, the following doesn't work
        <Style x:Key="Base_RadComboBox" TargetType="telerikInput:RadComboBox"
            <!--<Setter Property="ClearSelectionButtonContent" Value="{Binding Source={StaticResource MyControlStrings}, Path=ClearSelectionButtonContent, Mode=OneTime}"/>--> 
            <Setter Property="ClearSelectionButtonContent" > 
                <Setter.Value> 
                    <TextBlock Text="Clear Value" telerik:LocalizationManager.ResourceKey="ContextMenu_Add"/> 
                </Setter.Value> 
            </Setter> 
             
            <Setter Property="IsEnabled" Value="False"/> 
        </Style> 



Tags
ComboBox
Asked by
Alex
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Alex
Top achievements
Rank 1
Share this question
or