styling Radwindow.confirm

7 posts, 0 answers
  1. Anan
    Anan avatar
    31 posts
    Member since:
    Oct 2009

    Posted 02 Mar 2010 Link to this post

    Hello

    How do i apply my custom style to the Radwindow.confirm. I know we can do it for Radwindow.

    Anan
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 04 Mar 2010 Link to this post

    Hello Anan,

    Thank you for contacting us.

    Attached you will find a sample project in which is illustrated how to apply custom theme for the RadWindow.Confirm.

    If you have further questions please feel free to contact us again.

    Best wishes,
    Konstantina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Anan
    Anan avatar
    31 posts
    Member since:
    Oct 2009

    Posted 07 Mar 2010 Link to this post

    Hello

    Thx for ur reply...
    I don't want to apply custom theme...i want to style the outer frame of the confirm dialog...something like this
    RadWindow.Template = App.Current.Resources["RadWindow_ControlTemplate"] as ControlTemplate;

    I need to change the solid black on the outer frame to some other color.

    Thanks
  5. Anan
    Anan avatar
    31 posts
    Member since:
    Oct 2009

    Posted 07 Mar 2010 Link to this post

    Hello
    Just want to be more clear...when i say outer frame...its the header background color...
  6. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 08 Mar 2010 Link to this post

    Hi Anan,

    Thank you for contacting us.

    To achieve that you have to put the style in the resources of the Page. Add a x:Key value to the style. Then in the code behind:
    private void Button_Click(object sender, RoutedEventArgs e)
    {
           //Theme myTheme = new Theme(new Uri("/AlertTheme;component/Theme/AlertTheme.xaml", UriKind.Relative));
        RadWindow.Confirm(new DialogParameters
        {
            Content = "Humpty Dumpty sat on a wall. Humpty dumpty had a great fall.",
            Opened = OnAlertWindowOpened
        });
    }
    private void OnAlertWindowOpened(object sender, EventArgs e)
    {
        var window = sender as RadWindow;
        var confirm = window.Content as RadConfirm;
        confirm.Style = this.Resources["ConfirmStyle"] as Style;
    }

    Hope this helps.

    If you have further questions please feel free to contact us again.


    Greetings,
    Konstantina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Anan
    Anan avatar
    31 posts
    Member since:
    Oct 2009

    Posted 09 Mar 2010 Link to this post

    Hello

    That worked...Thanks...a small change
    it should be
    window.Style = App.Current.Resources["RadWindowStyle"] as Style;

    Anan
  8. Rakesh
    Rakesh avatar
    19 posts
    Member since:
    Feb 2012

    Posted 10 Aug 2012 Link to this post

    I have to show confirm window at many places in my Application. Is there anyway we can write intrinsic style or make our custom style applied wherever RadWindow Confirm pops up?
Back to Top
DevCraft banner