Our users want to disable the ability to add a window to a tab group via dropping on the Title Bar (Window Header). They want to retain the ability to add a window to a tab group by dropping on the center drop button. Is there any way this can be done?
Thanks
Dan
Hi Dan,
I've actually almost got this working although I'm running into a pretty major issue right now which is holding it back. The XamDockManager has a PaneDragOver event I'm using to determine if the mouse is over a content pane header and it sort of works but the issue is if I move over the center drop button and then move to the header the event doesn't fire again. Not sure if I'm doing something wrong or if that is by design so I'm checking with the developers.
I will let you know once I have a solution for this.
Rob,
Thanks. I'm looking forward to your solution.
Yeah it's definitely quirky. Make sure you add this to the product idea website if you haven't already: http://ideas.infragistics.com
Ron,
I modified our project per your sample. It works, albeit a little quirky. It should meet my user’s requirements until the new feature is added to the control.
Thank you very much.
I managed to scrape something together that could potentially be used. This should definitely be considered a hack as the XamDockManager currently does not have the functionality necessary to be able to disable drag interactions over a very specific area like you require. In my last update I mentioned using the PaneDragOver event but this event is not useable for this scenario because it only fires once per drag action. Right now dragging a pane over a pane header or the center drop button counts as the same drag action so the event will only fire once for one of those areas which makes it impossible to tell when a drag should be allowed or not.
The hack I came up with uses the PreviewMouseMove event and PreviewMouseLeftButtonUp event in order to stop a drop action from occurring. In the mouse move I check to see if the mouse is over a pane header, at which point I set a flag and change the cursor to designate to the user that they cannot drop here. If they try to drop the pane there I set e.Handled to true in the PreviewMouseLeftButtonUp event which prevents the mouse up event from reaching the dock manager which keeps it from dropping the pane there.
In my tests it seems to work for your described scenario. It's not perfect though and it is very much a hack. I highly recommend that you submit this as a new product idea for the dock manager control here so we can potentially implement something more appropriate for this scenario.