Skip to content

Commit

Permalink
(GH-3901) Fix hit testing for window titlebar if ResizeMode is NoResize
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Aug 11, 2020
1 parent 828fee0 commit 1e941f0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/MahApps.Metro/Themes/MetroWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@
<Trigger Property="GlowBrush" Value="{x:Null}">
<Setter TargetName="PART_Border" Property="controlzEx:WindowChrome.IsHitTestVisibleInChrome" Value="True" />
</Trigger>
<Trigger Property="ResizeMode" Value="NoResize">
<Setter TargetName="PART_Border" Property="controlzEx:WindowChrome.IsHitTestVisibleInChrome" Value="False" />
<Setter Property="ResizeBorderThickness" Value="0" />
</Trigger>
<!-- no icon and no icon content template -> collapse the icon content control -->
<MultiTrigger>
<MultiTrigger.Conditions>
Expand Down Expand Up @@ -519,6 +523,14 @@
</MultiTrigger.Conditions>
<Setter TargetName="PART_Border" Property="BorderBrush" Value="{Binding Path=BorderBrush, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
</MultiTrigger>
<!-- HitTest visibility -->
<Trigger Property="GlowBrush" Value="{x:Null}">
<Setter TargetName="PART_Border" Property="controlzEx:WindowChrome.IsHitTestVisibleInChrome" Value="True" />
</Trigger>
<Trigger Property="ResizeMode" Value="NoResize">
<Setter TargetName="PART_Border" Property="controlzEx:WindowChrome.IsHitTestVisibleInChrome" Value="False" />
<Setter Property="ResizeBorderThickness" Value="0" />
</Trigger>
<!-- no icon and no icon content template -> collapse the icon content control -->
<MultiTrigger>
<MultiTrigger.Conditions>
Expand Down

0 comments on commit 1e941f0

Please sign in to comment.