Skip to content

Commit

Permalink
Merge pull request #3902 from MahApps/fix/GH-3901-Window-NoResize
Browse files Browse the repository at this point in the history
Fix hit testing for window titlebar if ResizeMode is NoResize
  • Loading branch information
punker76 authored Aug 11, 2020
2 parents 828fee0 + 1e941f0 commit 055c71a
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 055c71a

Please sign in to comment.