I’m writing an industrial process control application to run on a PC, using .Net. The program monitors the progress of various parts being assembled by teams on the factory floor. There can be an arbitrary number of parts – 1,2,3,4,5, etc, and in the old VB6 version of the app each part gets its own window and the operators like to arrange them on the screen.
What I’m describing is a classic MDI interface but WPF doesn’t support MDI. Other threads on SO have suggested the wpfmdi project on Codeplex, but that’s listed as “abandoned” since last February ( http://wpfmdi.codeplex.com ) and avalondocks but those are docking tiles that don’t look like they can be arbitrarily dragged and moved.
I don’t know what to do. I didn’t want to use WinForms because WPF/XAML provides cooler visuals and easier styling and because Microsoft seems to have abandoned WinForms. The current VB6 version of this product is 12 years old and I’d like to plan on a similar lifespan for the new one.
Thanks in advance!
I found the answer on another discussion forum (I can’t remember which one or I’d give them credit). It turned out to be easier than I thought. If you hook the WM_MOVING message (I do it, below when the window is loaded) you can intercept moves before the window is moved and constrain the location of the window.
The XAML header looks like this:
. . . etc.