When activating tabs by clicking on the header, some tabs take a while to load because the contents are slow to load. This is not a problem.
However, when this happens, frequently the tab is dragged and torn off the radtabbedwindow, creating a new one.
Is there a way to stop tearing off tabs if the mouse has move less than 20 pixels for example?
4 Answers, 1 is accepted
I've tested the reported behavior, but I wasn't able to reproduce it. Can you please check the attached project and let me know if I am missing anything?
This happens because we load a lot of async data from our server, and we have heavy controls that need to be loaded. The results get invoked and somehow break off the grip on the Tabitem of the RadTabbedWindow. The mouse looses focus on the control at least.
The fact that the mouse grip is lost is not really a problem. The question was, how can I detect that the mouse has not moved much and cancel the dragging of the tabitem?
Thank you for the additional information.
Can you give the DragDropManager.MinimumHorizontalDragDistance and DragDropManager.MinimumVerticalDragDistance properties a try? These properties control the minimum horizontal/vertical distance before a move is considered a drag. Note, that the RadTabbedWindow uses the DragDropManager for its drag&drop operations.
You can set these properties at an early point in your application in order for them to be respected. Please, give this suggestion a try and let me know how it goes.
The solution you suggested reduces the behaviour sufficiently. The tabs will not drag anymore when a heavy UI loading is happening and you just click the header.I've inserted them in the loading event.
Thank you very much.