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

Change text on close button RadDateTimePicker

1 Answer 172 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Muheto
Top achievements
Rank 1
Muheto asked on 05 Feb 2018, 12:22 PM

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

1 Answer, 1 is accepted

Sort by
0
Accepted
Dilyan Traykov
Telerik team
answered on 07 Feb 2018, 05:09 PM
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.
Tags
Calendar
Asked by
Muheto
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or