![](/forums/images/avatarimages/5cc0885d-8831-419e-bca7-04d87d681de5pingman.jpg)
Brian Barnes
Top achievements
Rank 2
Brian Barnes
asked on 18 Dec 2009, 03:18 PM
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"
CanMove="True"
Header="Part Manager"
Opened="radManagePartsWindow_Opened"
Closed="radManagePartsWindow_Closed" Activated="radManagePartsWindow_Activated"
>
In my code I access it via:
private void btnManagePart_Click(object sender, RoutedEventArgs e)
{
radManagePartsWindow.DataContext = DataContext;
radManagePartsWindow.ShowDialog();
}
How can I get the modal window to ALWAYS be on top?
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"
CanMove="True"
Header="Part Manager"
Opened="radManagePartsWindow_Opened"
Closed="radManagePartsWindow_Closed" Activated="radManagePartsWindow_Activated"
>
In my code I access it via:
private void btnManagePart_Click(object sender, RoutedEventArgs e)
{
radManagePartsWindow.DataContext = DataContext;
radManagePartsWindow.ShowDialog();
}
How can I get the modal window to ALWAYS be on top?
9 Answers, 1 is accepted
0
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.
Regards,
Boyan
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.
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.
Regards,
Boyan
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.
0
![](/forums/images/avatarimages/default.gif)
Klaus Byskov Hoffmann
Top achievements
Rank 1
answered on 22 Jan 2010, 12:28 PM
Dear Boyan,
Thanks for that. I was having the exact same problem and your suggestion has solved it for me.
Kind regards,
Klaus
Thanks for that. I was having the exact same problem and your suggestion has solved it for me.
Kind regards,
Klaus
0
![](/forums/images/avatarimages/default.gif)
Geoff Smith
Top achievements
Rank 1
answered on 28 Apr 2010, 04:36 PM
Is there a way to set the owner for RadWindow.Alert?
0
Hello Geoff,
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.
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.
0
![](/forums/images/avatarimages/default.gif)
Pavel
Top achievements
Rank 1
answered on 19 Feb 2011, 10:37 AM
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:
App.xaml.cs
namespace Administration2010
{
public partial class App : Application
{
public App()
{
// user control
MainWindow MainWindow = Administration2010.MainWindow.Instance;
RadRibbonMainWindow ribbonWindow = Administration2010.RadRibbonMainWindow.Instance;
ribbonWindow.Content = MainWindow;
ribbonWindow.Show();
}
}
}
EDIT: I´m sorry, that works to set Owner at RadRibbonMainWindow. I did something wrong.
0
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?
Greetings,
Viktor Tsvetkov
the Telerik team
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?
Greetings,
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!
0
![](/forums/images/avatarimages/default.gif)
Pavel
Top achievements
Rank 1
answered on 25 Feb 2011, 12:15 PM
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.
0
![](/forums/images/avatarimages/615799e2-a9f5-4868-8a38-624bc217966csaykorcomlogo.png)
Saykor
Top achievements
Rank 2
answered on 17 Sep 2012, 06:41 AM
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
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
0
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
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.