Skip to content

Commit

Permalink
Alternative fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eriove committed Apr 12, 2021
1 parent a1aa721 commit c3729ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions source/Components/AvalonDock/DockingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1882,9 +1882,7 @@ protected override void OnPreviewKeyDown(KeyEventArgs e)
/// <param name="e"></param>
private static void OnContextMenuPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (d.Dispatcher.CheckAccess() &&
e.NewValue is ContextMenu contextMenu &&
contextMenu.Dispatcher.CheckAccess())
if (e.NewValue is ContextMenu contextMenu)
{
contextMenu.Resources = ((DockingManager)d).Resources;
}
Expand Down
4 changes: 2 additions & 2 deletions source/Components/AvalonDock/Themes/generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,8 @@
<Setter Property="AnchorableHeaderTemplate" Value="{StaticResource AnchorableHeaderTemplate}" />
<Setter Property="DocumentTitleTemplate" Value="{StaticResource DocumentTitleTemplate}" />
<Setter Property="AnchorableTitleTemplate" Value="{StaticResource AnchorableTitleTemplate}" />
<Setter Property="AnchorableContextMenu" Value="{StaticResource AnchorableContextMenu}" />
<Setter Property="DocumentContextMenu" Value="{StaticResource DocumentContextMenu}" />
<Setter Property="AnchorableContextMenu" Value="{DynamicResource AnchorableContextMenu}" />
<Setter Property="DocumentContextMenu" Value="{DynamicResource DocumentContextMenu}" />
<Setter Property="DocumentPaneMenuItemHeaderTemplate" Value="{StaticResource DocumentHeaderTemplate}" />
<Setter Property="IconContentTemplate" Value="{StaticResource IconContentTemplate}" />
<Setter Property="Template">
Expand Down

0 comments on commit c3729ab

Please sign in to comment.