0

What I like to have: A Dashboard which the user can realigned/move/resize a board with Drag&Drop ability. The easiest solution could be perhabs to use simple dock windows like AvalonDock. But because I don't like floating windows, I must be possible to automatic re-dock the floating window if the user don't dock it.

What I tried: I found in LayoutContent.Dock the method, which I need to call when the user stops dragging the floating window. I think, after LayoutFloatingWindowControl.FilterMessage -> case Win32Helper.WM_EXITSIZEMOVE: would be the best place. But after this point I found no event to notify me. Do I didn't see the solution? Next problem: How can I get the object of type LayoutContent to call Dock? :/

Can I continue to pursue my idea? Or did you know other free controls or ideas to realize this?

Thanks

Michael
  • 113
  • 6

1 Answers1

0

AvalonDock LayoutDocument and LayoutAnchorable (the controls that hold the content) have a property CanFloatset it to false and it will not be able to float and you don't need to dock it.

see the docs: https://github.com/xceedsoftware/wpftoolkit/wiki/AvalonDock

Shloime Rosenblum
  • 927
  • 11
  • 26
  • Thanks for your suggestion. But if this flag is false, then I can't move any window (board) at all. I need more a property like "AutoDock". If the user move a window, but don't dock it to another side of a other board, then the moved board docks automatically to his old position again. – Michael Aug 31 '18 at 22:26
  • what is your problem with the `Dock` method – Shloime Rosenblum Sep 02 '18 at 17:23
  • What do you mean? I don't have a problem with `Dock` – Michael Sep 03 '18 at 21:55
  • Why can't you call the `Dock` function? – Shloime Rosenblum Sep 05 '18 at 01:36
  • I believe his whole point is WHEN / WHERE to react to add a hooke to be notified of the move to be able to call Dock. You'd have to handle the order and side it appeared too... but that's another problem. – netniV Sep 28 '18 at 06:58