Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1090
Can a XamDockManager be used to make a wpf mdi parent?
posted

Hey,

I have a win forms app that uses an mdi parent form.  It's not the same feel as something like Word or as something like visual studio.  It's a bunch of varying forms that float inside of the parent.

 To convert this to wpf I was thinking I could just convert each form over as a wpf user control.  Each menu option could create the corresponding user control, put it in a content pane, then add it to the XamDockManager as a "document".  The user could then use the tabs to navigate through the different screens or could move/dock/float them around to arrange them.

 Is this approach sound like a valid use of the XamDockManager?  I want to have my screens in one "shell", but I also want it to be intuitive to the user.  The docking/sizing piece feels awkward (do the user controls stay centered or resize to fill the visible region?).  Also, hitting ctrl-tab within the dock manager and seeing a screen listed as a "file" feels awkward.

 Any guidance would be greatly appreciated.

 

Thanks

Parents
No Data
Reply
  • 54937
    Offline posted

    jlotridge said:
     Is this approach sound like a valid use of the XamDockManager?

    The DocumentContentHost is designed to provide a tabbed document interface similar to that of VS so if that tabbed document model fits your needs then it seems fine.

    jlotridge said:
    The docking/sizing piece feels awkward (do the user controls stay centered or resize to fill the visible region?).

    I'm not sure what you mean by awkward. The docking/sizing follows the behavior of VS. With regards to where/how the content of the ContentPane is positioned/arranged that is really up to you. By default the (Horizontal|Vertical)ContentAlignment is set to stretch so the content will be stretched to fill the content pane. You can change that based on your needs. As to what happens to the contents of whatever you put into the ContentPane (e.g. your usercontrol) again that is really up to you and the content within each. You would use whatever panels/etc. you would want to arrange the contents.

    jlotridge said:
    Also, hitting ctrl-tab within the dock manager and seeing a screen listed as a "file" feels awkward.

     Again this mimics the behavior you find in VS. You can handle the ExecutingCommand and cancel the event when the command is the ShowPaneNavigator. Then use your own logic for activating a pane or perhaps try using the KeyboardNavigation class' ControlTabNavigation property.

Children