How can I localize the Clear Content Button?

3 posts, 0 answers
  1. Alex
    Alex avatar
    141 posts
    Member since:
    Mar 2010

    Posted 03 May 2010 Link to this post

    Hi,

    I was just wondering how would I localize the clear content button? (Preferably in XAML)
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 04 May 2010 Link to this post

    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.
  3. DevCraft banner
  4. Alex
    Alex avatar
    141 posts
    Member since:
    Mar 2010

    Posted 04 May 2010 Link to this post

    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> 



Back to Top