I'm using a custom theme to modify the appearance of anchorables in AvalonDock (2.5). When I undock an anchorable and right-click on the title in the floating window, the system menu appears (with entries such as Restore, Minimize, Maximize, etc.). When I click anywhere in the floating window the system menu disappears and the correct context menu appears (AnchorableContextMenu). After that, right-click always opens the AnchorableContextMenu.
I don't think the theme itself is the issue, but it is related to the theme, because without it, the context menu works fine. I'm able to reproduce the problem using a copy of the generic theme (modified to make the XML namespaces work).
I use a class to wrap it:
I don't think the theme itself is the issue, but it is related to the theme, because without it, the context menu works fine. I'm able to reproduce the problem using a copy of the generic theme (modified to make the XML namespaces work).
I use a class to wrap it:
Imports Xceed.Wpf.AvalonDock.Themes
Public Class MyTheme
Inherits Theme
Public Overrides Function GetResourceUri() As Uri
Return New Uri("pack://application:,,,/MyProgram;component/MyTheme.xaml")
End Function
End Class
and use it as follows:<avalonDock:DockingManager>
<avalonDock:DockingManager.Theme>
<local:MyTheme />
</avalonDock:DockingManager.Theme>
...
</avalonDock:DockingManager>
What can I do to make the correct context menu appear on the first click?