0

I'm working with a proprietary framework at the moment, which takes over the role of the standard WPF window manager to create a desktop-like effect.

In this framework, we can only work in XAML. And a request came to create a Visual Studio-like "Windows" menu that lists the active Windows and allows one of them to be brought forward.

However I'm having some issues with the second half. I've tried binding the MenuItems IsChecked property to the Window objects Topmost property, but as WPF allows multiple windows to be topmost, it does not work perfectly. Unfortunately we cannot add code behind, as it is all managed by the framework.

Is there any solution for doing the window switching part without any code?

fonix232
  • 2,132
  • 6
  • 39
  • 69

1 Answers1

0

There is Zindex property which is widely used in terms of bringing any window or control at the top. if you have say multiple window or multiple controls withing a window set some value of zindex , it will put the window or control at the top which has the highest zindex value. Try setting zindex value from xamal to bring forth the window you need, using trigger you can set it's value on clicking the menu you have created

Vjendra Gaorh
  • 318
  • 2
  • 15
  • Sorry, I missed that part from my question - for some reason, ZIndex does not work within this framework. The MDI part was modified, and it apparently ignores the ZIndex, and just uses the Window.Activate() command to bring it to top - which is not bindable. – fonix232 Apr 04 '16 at 12:51
  • @fonix Hi check if this helps if you are able to add interactivity dll reference which comes as part of blend (http://stackoverflow.com/questions/2900353/wpf-silverlight-states-activate-from-xaml) – Vjendra Gaorh Apr 04 '16 at 13:33