Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: AvalonDock: Custom theme causes wrong context menu in title of floating window

$
0
0
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:
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?

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>