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

RadWindow.Confirm ModalBackground settings from code

3 Answers 188 Views
Window
This is a migrated thread and some comments may be shown as answers.
Perry Robertson
Top achievements
Rank 2
Perry Robertson asked on 04 Feb 2009, 10:45 PM
I have a menu item that triggers a method in which I call
    RadWindow.Confirm("Are you sure you want to do this?", new EventHandler<WindowClosedEventArgs>(OnClosed));

I want to change the ModalBackground but I can't seem to figure out how from code.  RadWindow.Confirm also takes DialogParameters but that object doesn't contain any attributes regarding the modal background. 

Do I have to setup a style resource or something to manage the RadWindows modal background attributes?

Thanks

3 Answers, 1 is accepted

Sort by
0
Accepted
Hristo Borisov
Telerik team
answered on 05 Feb 2009, 01:43 PM
Hi Perry Robertson,

Thank you for contacting us. Currently, there is no way of changing the modal background of Alert, Prompt or Confirm dialogs. This is a very good suggestion and we will work on improving this behavior as soon as possible. Until then you can easily configurate RadWindow that will act as your confirmation control. In case you have any troubles configuring it, you can write us asap in order to provide you will a sample implementation. Thank you for suggesting such valuable feature. Your telerik points have been updated.

All the best,
Hristo Borisov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Alexey Pershin
Top achievements
Rank 1
answered on 13 Sep 2011, 03:53 PM
Hi

Has the issue been resolved in new versions.
I'm trying to set ModalBackground for Confirm but it still doesn't work.

Thanks a lot.
0
Boyan
Telerik team
answered on 16 Sep 2011, 03:45 PM
Hello Alexey Pershin,

This should be working fine with latest version. Here is the code you should use:
SolidColorBrush brush1 = new SolidColorBrush(Colors.Red);
var rect1 = new Rectangle() { Fill = brush1, Height = 20, Width = 20 };
DialogParameters dP = new DialogParameters()
{
    CancelButtonContent = "Cancel",
    DefaultPromptResultValue = "Test",
    Header = "Test",
    ModalBackground = brush1,
    OkButtonContent = "OK"              
};
RadWindow.Confirm(dP);

Let us know if you still have problems.

Kind regards,
Boyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Window
Asked by
Perry Robertson
Top achievements
Rank 2
Answers by
Hristo Borisov
Telerik team
Alexey Pershin
Top achievements
Rank 1
Boyan
Telerik team
Share this question
or