Skip to content

Commit

Permalink
Collapse dialog title if it's empty #2498
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Jul 8, 2016
1 parent a65bff6 commit 1707586
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion MahApps.Metro/Themes/Dialogs/BaseMetroDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
<TextBlock x:Name="PART_Title"
Grid.Row="0"
FontSize="{TemplateBinding DialogTitleFontSize}"
Foreground="{TemplateBinding Foreground}"
Text="{TemplateBinding Title}"
Expand All @@ -74,6 +75,9 @@
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Title" Value="{x:Null}">
<Setter TargetName="PART_Title" Property="Visibility" Value="Collapsed" />
</Trigger>
<EventTrigger RoutedEvent="Loaded">
<EventTrigger.Actions>
<BeginStoryboard Storyboard="{StaticResource DialogShownStoryboard}" />
Expand Down
1 change: 1 addition & 0 deletions docs/release-notes/1.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,4 @@ MahApps.Metro v1.3.0 bug fix and feature release.
- #2224 DropDownButton uses ItemTemplate template binding twice
- #2569 DropDownButton popup placement
- #2574 SplitButton Popup Doesn't Close After Alt+Tab (@Deadpikle)
- #2498 Vertical space for Title still being taken up even though Title is blank

0 comments on commit 1707586

Please # to comment.