4 Answers, 1 is accepted
0
Hello Jonathan,
What we could suggest you in order to achieve the desired is to create an instance of RadWindow and set its Owner property to the MainWindow before calling its ShowDialog method - thus the RadWindow will always be on top of their parent:
Hopes this helps.
Regards,
Nasko
Telerik
What we could suggest you in order to achieve the desired is to create an instance of RadWindow and set its Owner property to the MainWindow before calling its ShowDialog method - thus the RadWindow will always be on top of their parent:
RadWindow window =
new
RadWindow();
...
window.Owner =
this
;
window.ShowDialog()
Hopes this helps.
Regards,
Nasko
Telerik
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 Feedback Portal
and vote to affect the priority of the items
0
Jonathan
Top achievements
Rank 1
Iron
Veteran
answered on 26 Jun 2015, 10:53 AM
On showdialog I get
An unhandled exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll
Additional information: Cannot set Owner property to a Window that has not been shown previously.
public DashBoard()
{
InitializeComponent();
Clock clock = new Clock();
clock.Owner = this;
clock.ShowDialog();
Any ideas? thanks!
0
Accepted
Hello Jonathan,
The thrown exception is an expected one as you are trying to set the Owner property to a Window that is not yet initialized and visualized completely. We suggested you to handle the Loaded event of the Window and create RadWindow inside it - thus it will be sure that the Window is completely loaded:
Hopes this helps.
Regards,
Nasko
Telerik
The thrown exception is an expected one as you are trying to set the Owner property to a Window that is not yet initialized and visualized completely. We suggested you to handle the Loaded event of the Window and create RadWindow inside it - thus it will be sure that the Window is completely loaded:
public
MainWindow()
{
InitializeComponent();
this
.Loaded += MainWindow_Loaded;
}
void
MainWindow_Loaded(
object
sender, RoutedEventArgs e)
{
RadWindow window =
new
RadWindow();
window.Owner =
this
;
window.Show();
}
Hopes this helps.
Regards,
Nasko
Telerik
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 Feedback Portal
and vote to affect the priority of the items
0
Jonathan
Top achievements
Rank 1
Iron
Veteran
answered on 26 Jun 2015, 11:26 AM
thanks again!!!