I am using RadWindow.Confirm, even if I specify the OkButtonContent as "Yes and CancelButtonContent as No, the size of the buttons remain unchangesd. Now "No" button is larger than the "Yes" button. How can I get rid of this. Please suggest.
The size of the buttons is fixed in the template. To change the size you need to edit the template and make your custom theme which you can attach to your confirm window.
Below I will explain in a few steps how this can be achieved:
1. Add <telerikNavigation:RadConfirm/> to your xaml file, then right-click on the xaml file and choose "Open in Expression Blend " - to have this option in VS you need to install Expression Blend
2. In the Blend studio find the RadConfirm window right-click on it and "Edit a Copy" . This will allow you to edit the Template. In the xaml, locate the lines shown below:
Please note that these are the changed buttons
3. Change the Buttons as per your requirements, then save the changes
4. In VS create a xaml file and add the Edited template as a ResourceDictionary
5. Then, when you create your RadConfirm window in the code-behind just add the theme like this:
RadWindow.Confirm(new DialogParameters()
{
Header = "header",
Theme = new Theme(new Uri("/ChangeWindowConfirmTemplate;component/WindowTheme.xaml", UriKind.Relative))
});
6. That's it, you have customized the Confirm window.