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

Alert/Confirm/Prompt not styling Buttons

4 Answers 146 Views
Window
This is a migrated thread and some comments may be shown as answers.
Johannes
Top achievements
Rank 1
Johannes asked on 26 Jun 2014, 11:31 AM
I have a usual UserControl with a button. I just want so show a RadWindow.Alert. Here's the Code behind:

public partial class TestView
{
    public TestView()
    {
        InitializeComponent();
    }
 
    private void TestButton_OnClick(object sender, RoutedEventArgs e)
    {
        RadWindow.Alert(new DialogParameters
            {
                Content = "Test",
                ContentStyle = Resources["RadAlertStyle"] as Style,
                WindowStyle = Resources["RadWindowStyle"] as Style
            });
    }
}


This is done as shown in the WPF demos but in my case the buttons on the RadWindow.Alert dialog are not styled. I use Telerik Windows 8 theme. All RadButtons are style correctly in Windows 8 style but not on any of my RadWindow dialogs. What am I missing? Please see attached image.


4 Answers, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 26 Jun 2014, 02:17 PM
Hello Johannes,

Unfortunately, you do not provide enough information in order for me to investigate the issue. However, we have a full tutorial available on how to accomplish it. This article in the documentation will take you step-by-through styling the RadWindow.

Regards,
Lance | Senior Support Specialist
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Johannes
Top achievements
Rank 1
answered on 27 Jun 2014, 08:34 AM
I've tried to run through the tutorial but when copying the template of a RadDataForm I just get an error and Blend only creates an unfinished RadWindow template. However I found out what caused the problem: I had all Windows 8 theme resources inside my TestView.xaml (UserControl.Resources) and now I've moved them to App.xaml (Application.Resources). Now buttons on all RadWindows get also styled in Windows 8 style. So it seems that the Telerik theme resources have to be in App.xaml to be reachable from RadWindow.
0
Johannes
Top achievements
Rank 1
answered on 27 Jun 2014, 08:37 AM
[quote]but when copying the template of a RadDataForm [/quote]

Of course I meant RadWindow.
0
Accepted
Kalin
Telerik team
answered on 27 Jun 2014, 10:27 AM
Hi Johannes,

Indeed any styles targeting RadWindow should be placed in App.xaml as the shown RadWindow it is not located in the same visual tree as the MainWindow for example.

Hope this helps.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Window
Asked by
Johannes
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Johannes
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or