brasso_42
asked on
WPF App window.ShowDialog()
Hi
I have an app which has a button that opens a second window and disables the window that opened it.
This works fine, but if I browse away from the app and then click on it again in the task bar the disabled window appears ontop of the new window.
How can I get it to display the correct window when the app is clicked in the task bar.
My code so far is very simple:
Dim window As New Window2
window.ShowDialog()
Thanks
Brasso
I have an app which has a button that opens a second window and disables the window that opened it.
This works fine, but if I browse away from the app and then click on it again in the task bar the disabled window appears ontop of the new window.
How can I get it to display the correct window when the app is clicked in the task bar.
My code so far is very simple:
Dim window As New Window2
window.ShowDialog()
Thanks
Brasso
you can set the AlwaysOnTop property of the child window to true. also when doing window.ShowDialog() if you are doing this from the parent window do this instead window.ShowDialog(this)
ASKER
Hi
I used Topmost="True" and that worked a treat. I dont understand the w.dow.showdialog(this) bit though.
this -- is not recognised. what differance does that make?
Thanks brasso
I used Topmost="True" and that worked a treat. I dont understand the w.dow.showdialog(this) bit though.
this -- is not recognised. what differance does that make?
Thanks brasso
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great thanks