Hello,
I trying to create a MDI application in WPF, using the XamDocManager. Loading different "windows" in a tabgrouppane works as intended, but if I want to change a pane to floating, it will not create a "windows" border around the content pane. By making a content pane floating, I would expect to get a window border around it.
Is this intended? Is it an windows issue? Is there a solution to make it work?
I would also like to prevent any floating content pane to move outside the main window. Is there a way to solve this too?
Does the docmanager also prevents windows, i.e. dialog windows opened from a content pane, from having it's normal window border? For me, this is the case, wich also seem odd. Any advice in this case?
Below are two images hopefully showing what I mean.
/ FW
Hello Fredrik,
I have been investigating into this behavior you are currently seeing, and while I’m a little bit unsure of the exact behavior you are seeing from the screenshots you have provided, it sounds like the floating windows are borderless on your end. I can see this on the left-side of the headers on my end, but I can’t seem to reproduce it with the rest of the floating window. Are you utilizing any Infragistics themes or potentially styling the ToolWindow element in your application?
With the above said, you may be able to prevent this behavior by handling the ToolWindowLoaded event and setting the e.Window.UseOSNonClientArea property to “false,” where ‘e’ is the event arguments of the ToolWindowLoaded event handler.
Regarding the XamDockManager preventing other windows opened from a ContentPane from having its normal border: no, it shouldn’t prevent that. I would expect that the WPF Windows or dialogs are unaffected by the presence of the XamDockManager alone.
Regarding your query about the floating content pane, I am a little bit unsure of what you are looking to achieve? Which Window are you trying to prevent it from moving outside of? Is it the window that houses the XamDockManager? With those questions, I can say that there does not exist anything built-in to achieve this, but it might be doable with some application code. Can you please confirm the behavior you are looking to achieve so I may give you a more definite answer on this?
Please let me know if you have any other questions or concerns on this matter.
Hi,
I've been trying and testing a bit more in some the different issues and questions I had.
For floating panes, setting the UseOSNonClientArea property to false gives me a border around the floating pane. If it true, the border is not there. Since this border is rather thick when set to false, is it possible to restyle it somehow?
vs
For modal dialog windows, the border issue only seems to exist when WindowStyle is set to ToolWindow, the other options seems to have a correct border around the window. The UseOSNonClientArea have no impact in this case. Is the ToolWindow option overriden in some way, since it seems to be the same with the floating panes (only close button visible in the header). I can't recall having this issue with other WPF applications when using ToolWindow WindowStyle.
My last question was if it is possbile to keep the floating pane/window within the main window area or even the docmanager area of the main window, like a "classic" MDI application.
I hope this helps explain my issues better.
Thank you for your update on this matter.
Regarding restyling the panes in the XamDockManager when setting UseOSNonClientArea to false, you can do this by including the default style for ToolWindow that we expose. This style and its dependencies are exposed within the PrimitivesGeneric.xaml file commonly found at the following directory with Infragistics controls installed:
C:\Program Files (x86)\Infragistics\<version>\WPF\DefaultStyles\Windows
In version 19.2, this style exists right around line 2155 of the file mentioned above.
Regarding the borderless windows, I am under the impression that these modal dialogs are Window elements that you are opening using the ShowDialog() method and are setting the WindowStyle to ToolWindow. If this is incorrect, please let me know as the following is based upon this impression. With that said, this behavior appears to be expected, as after removing the Infragistics references from my test project, I am able to see that opening a Window this way results in a borderless window. It appears to be the default WPF style for tool windows in this case.
Regarding the behavior of keeping a floating pane / window within the main window area or even the dock manager area, this is not something that is built-in to the XamDockManager. If you would like to see it potentially implemented in a future version of the XamDockManager, I would recommend suggesting a new product idea for this behavior at our WPF Ideas Site, here. This will place you in direct communication with our product management teams who plan and prioritize upcoming features and development based on community and user feedback.