Modal Window Not On Top

10 posts, 0 answers
  1. Brian Barnes
    Brian Barnes avatar
    1 posts
    Member since:
    Dec 2009

    Posted 18 Dec 2009 Link to this post

    I have just started using the Rad controls for WPF and have come across an issue I cannot resolve on my own. 

    I open a RadWindow with the ShowDialog() function call.  The window appears, and is in Modal mode, however, if I set focus to another application, when I come back to my WPF application, the modal window is no longer on top.  There are no icons for the modal window in my task bar.  The only way I can get back modal window is to use the Alt-tab functionality.

    In the XAML my Radwindow is defined:

                    <telerik:RadWindow Name="radManagePartsWindow" Height="530" Width="1000"
                                       telerik:Theming.Theme="Office_Blue" Visibility="Collapsed"
                                       ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
                                       Header="Part Manager"
                                       Closed="radManagePartsWindow_Closed" Activated="radManagePartsWindow_Activated"
    In my code I access it via:

            private void btnManagePart_Click(object sender, RoutedEventArgs e)
                radManagePartsWindow.DataContext = DataContext;
    How can I get the modal window to ALWAYS be on top?

  2. Boyan
    Boyan avatar
    758 posts

    Posted 19 Dec 2009 Link to this post

    Hi Brian Barnes,

    The RadWindow control for WPF is actually using a WPF Window control "behind the scene" to implement the modal logic. Because of this, the RadWindow control acts just like the Window control in WPF - if you have a main window that shows the RadWindow control and you need to make the RadWindow control be always on top of it, you just need to set the Owner property of the RadWindow control to be the main window.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Klaus Byskov Hoffmann
    Klaus Byskov Hoffmann avatar
    1 posts
    Member since:
    Dec 2009

    Posted 22 Jan 2010 Link to this post

    Dear Boyan,
    Thanks for that. I was having the exact same problem and your suggestion has solved it for me.

    Kind regards,

  4. Geoff Smith
    Geoff Smith avatar
    48 posts
    Member since:
    Mar 2010

    Posted 28 Apr 2010 Link to this post

    Is there a way to set the owner for RadWindow.Alert? 
  5. Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 29 Apr 2010 Link to this post

    Hello Geoff,

     In the latest version of RadControls for WPF, the DialogParameters class has an Owner property that allows you to specify an owner. Please keep in mind that the owner should be either a RadWindow or a Window control.

    Best wishes,
    Miroslav Nedyalkov
    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.
  6. Pavel
    Pavel avatar
    21 posts
    Member since:
    Sep 2010

    Posted 19 Feb 2011 Link to this post

    I have got similar problem. But I´m opening RadWindow from UserControl, so can´t set owner to UserControl. Is there another way how to set RadWindow opened from UserControl always on the top? I tried to set owner to RadRibbonMainWindow, but that doesn´t work.

    My code:


    namespace Administration2010 
        public partial class App : Application 
            public App() 
                // user control 
                MainWindow MainWindow = Administration2010.MainWindow.Instance; 
                RadRibbonMainWindow ribbonWindow = Administration2010.RadRibbonMainWindow.Instance; 
                ribbonWindow.Content = MainWindow; 

    EDIT: I´m sorry, that works to set Owner at RadRibbonMainWindow. I did something wrong.

  7. Viktor Tsvetkov
    Viktor Tsvetkov avatar
    382 posts

    Posted 24 Feb 2011 Link to this post

    Hello Pavel Bily,

    I am not sure what exactly you problem is, so could you please send us your sample application and tell us the steps to reproduce the issue?

    Viktor Tsvetkov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  8. Pavel
    Pavel avatar
    21 posts
    Member since:
    Sep 2010

    Posted 25 Feb 2011 Link to this post

    It´s all right already as I wrote at the end of my post. I have inside of Window UserControl. And from code behing of UserControl displays RadWindow. But I can set Owner property to Window (parent of UserControl) and it works then.
  9. Saykor
    Saykor avatar
    70 posts
    Member since:
    Feb 2011

    Posted 17 Sep 2012 Link to this post

    OrderWindow ow = new OrderWindow();
                            ow.ResizeMode = ResizeMode.NoResize;
                            ow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                            ow.Header = mi.Header.ToString();
                            ow.Owner = this; //this is a Page
    it seems i cannot  add Owner to be my page. Need to be a UserControl
  10. Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 18 Sep 2012 Link to this post

    Hi Dimitar,

    The Owner of the RadWindow control is meant to be either another RadWindow control or a WPF Window control. Any other type of owner will be ignored by the RadWindow control.

    All the best,
    Miroslav Nedyalkov
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Back to Top