Change text on close button RadDateTimePicker

2 posts, 1 answers
  1. Muheto
    Muheto avatar
    1 posts
    Member since:
    Feb 2018

    Posted 05 Feb Link to this post

    Hi; 

    I had try to change a text "Close" on close button RadDateTimePicker without success. First i used Blend , but i get som error and second i tried to add Culture to the local language. 

    What can i do more.

    Salutation

    Muheto

  2. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    676 posts

    Posted 07 Feb Link to this post

    Hello Muheto,

    You can use a custom LocalizationManager in order to change the text of the button. The resource string responsible for this is "Close". Here's the code of interest:

    public class CustomLocalizationManager : LocalizationManager
    {
        public override string GetStringOverride(string key)
        {
            switch (key)
            {
                case "Close":
                    return "OK";
            }
            return base.GetStringOverride(key);
        }
    }

    public MainWindow()
    {
        LocalizationManager.Manager = new CustomLocalizationManager();
        InitializeComponent();
    }

    Alternatively, you can edit the default control template of the RadDateTimePicker control.

    Please let me know if any of these approaches works for you.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top