No updates since 2013? I hope someone is maintaining this project.
I have a bug and a solution which I would like you to add to your source.
Here the bug:
If you have 2 panes. The first pane has a simple ListBox and the second pane has a ListBox with ContextMenu. You left click on an item in the first ListBox and then right click on an item in the second ListBox. The chances are that the context menu will pop up and immediatly close, instead of staying open.
And the solution:
The problem exists because of the focus switching between the two panes. In OnLayoutRootPropertyChanged you set the focus with SetFocusOnLastElement in a BeginInvoke function. But with DispatcherPriority.Background it sometimes happens that this action is done after the menu popped up. So with focus switching the menu closes automatically.
So I would appreciate, if you could set this priority to DispatcherPriority.Normal in the future versions of AvalonDock, because then the context menu works as it should.
TIA
Michael
I have a bug and a solution which I would like you to add to your source.
Here the bug:
If you have 2 panes. The first pane has a simple ListBox and the second pane has a ListBox with ContextMenu. You left click on an item in the first ListBox and then right click on an item in the second ListBox. The chances are that the context menu will pop up and immediatly close, instead of staying open.
And the solution:
The problem exists because of the focus switching between the two panes. In OnLayoutRootPropertyChanged you set the focus with SetFocusOnLastElement in a BeginInvoke function. But with DispatcherPriority.Background it sometimes happens that this action is done after the menu popped up. So with focus switching the menu closes automatically.
So I would appreciate, if you could set this priority to DispatcherPriority.Normal in the future versions of AvalonDock, because then the context menu works as it should.
TIA
Michael