RadWindow.Confirm ModalBackground settings from code

4 posts, 1 answers
  1. Perry Robertson
    Perry Robertson avatar
    16 posts
    Member since:
    Nov 2004

    Posted 04 Feb 2009 Link to this post

    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
  2. Answer
    Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 05 Feb 2009 Link to this post

    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.
  3. DevCraft banner
  4. Alexey Pershin
    Alexey Pershin avatar
    2 posts
    Member since:
    Dec 2009

    Posted 13 Sep 2011 Link to this post

    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.
  5. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 16 Sep 2011 Link to this post

    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 >>

Back to Top