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

Changing a RadConfirm/Alert/Prompt Window Border

6 Answers 250 Views
Window
This is a migrated thread and some comments may be shown as answers.
Vic
Top achievements
Rank 2
Vic asked on 10 Jul 2009, 09:05 PM

Hello,

 

Only looking to change the border color of a RadConfirm/Alert/Prompt, am assuming that these controls inherit from a RadWindow and their styles too, I am just having problems exposing the BorderBrush/Color to them.

 

Any help is much appreciated!

 


Thanks

6 Answers, 1 is accepted

Sort by
0
Hristo Borisov
Telerik team
answered on 15 Jul 2009, 01:36 PM
Hi Vic,

Yes, you are correct the modal windows inherit its style from the RadWindow control template. If you change edit the brushes that construct the border of RadWindow you will have the borders changed. What are the problems you have in changing the colors of these brushes? Thank you for contacting us and we look forward to receiving your feedback.

Sincerely yours,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Vic
Top achievements
Rank 2
answered on 15 Jul 2009, 01:56 PM
Hi Hristo,

 

Thanks for replying, I still don't see how I can do this.. The DialogParameters struct doesn't have such a field, the

RadWindow class exposes BorderBackgroundProperty, BorderBrushProperty, BorderThicknessProperty but all are readonly fields.

Below is the actual implementation.

Any ideas?

Thanks,
Vic 

 public static void ConfirmDialog(string message, string header, EventHandler<WindowClosedEventArgs> DialogClosedHandler)  
        {  
            DialogParameters dlg = new DialogParameters();  
            dlg.Content = message;  
            //dlg.ModalBackground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(70, 0, 0, 255));  
            dlg.ModalBackground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(0, 0, 0, 0));  
            dlg.IconContent = null;  
            dlg.Closed = DialogClosedHandler;  
            dlg.Header = header;  
            dlg.CancelButtonContent = "No";  
            dlg.OkButtonContent = "Yes";  
            RadWindow.Confirm(dlg);  
              
        } 
0
Hristo Borisov
Telerik team
answered on 15 Jul 2009, 02:20 PM
Hello Vic,

I meant to say changing the theme of the RadWindow. You should edit on of the RadWindow built-in themes which also will be reflected in the modal dialogs. Currently, there is no way you can directly change the theme of a single modal dialog. We are working on improving our theming mechanism in order to support better and easier skinning. To learn how to change the built-in themes please check this article. Please contact us if you have any further questions.

Regards,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Vic
Top achievements
Rank 2
answered on 15 Jul 2009, 06:18 PM

Hi Hristo,

Think I am getting close but it still doesn't work, below are the steps I took.

I extracted 2 xaml files from the "Red" themes source and added them to a shared component we use

Telerik.Windows.Themes.Default_Red\Themes\Common.xaml

Telerik.Windows.Themes.Default_Red\Themes\Window.xaml

In Window.xaml I modified the Telerik:ResourceDictionary Source prop to point to my copy of Common.xaml

In Common.Xaml I modified the RadWindow_OuterBorder and RadWindow_OuterBackground to different colors..

Applied it to the Theme prop as such:

  public static void ConfirmDialog(string message, string header, EventHandler<WindowClosedEventArgs> DialogClosedHandler)  
        {  
            DialogParameters dlg = new DialogParameters();  
            dlg.Content = message;  
            //dlg.ModalBackground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(70, 0, 0, 255));  
            dlg.ModalBackground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(0, 0, 0, 0));  
            dlg.IconContent = null;  
            dlg.Closed = DialogClosedHandler;  
            dlg.Header = header;  
            dlg.CancelButtonContent = "No";  
            dlg.OkButtonContent = "Yes";  
            dlg.Theme = new Theme(new Uri("/Silverlight.Shared;component/Themes/Telerik/Window.xaml", UriKind.Relative));  
 
             
            RadWindow.Confirm(dlg);  
        } 

In the documentation you gave me it says I should call "StyleManager.SetTheme(<Window>, customTheme); " after I set the style.

But I cannot because the RadWindow.Confirm is a staic method.

Have any ideas what I am doing wrong?

Thanks again!

0
Accepted
Hristo Borisov
Telerik team
answered on 21 Jul 2009, 02:03 PM
Hi Vic,

I have tried the case and it seems that we have a bug in the Theme property of the modal windows. We will work to resolve this issue before our service pack release. Please excuse us for this inconvenience.

Sincerely yours,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Vic
Top achievements
Rank 2
answered on 21 Jul 2009, 04:49 PM
Thanks for the reply, anxiously awaiting the fix :)

Tags
Window
Asked by
Vic
Top achievements
Rank 2
Answers by
Hristo Borisov
Telerik team
Vic
Top achievements
Rank 2
Share this question
or