Skip to content

Commit

Permalink
Merge pull request #316 from lepoco/revert-303-main
Browse files Browse the repository at this point in the history
Revert "Added Titlebar Property to set the Close button visibility"
  • Loading branch information
pomianowski authored Jul 30, 2022
2 parents 1ae7f60 + cfd1b78 commit 6212d26
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
18 changes: 1 addition & 17 deletions src/Wpf.Ui/Controls/TitleBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,6 @@ public class TitleBar : System.Windows.Controls.Control, IThemeControl
nameof(ShowMinimize),
typeof(bool), typeof(TitleBar), new PropertyMetadata(true));

/// <summary>
/// Property for <see cref="ShowClose"/>.
/// </summary>
public static readonly DependencyProperty ShowCloseProperty = DependencyProperty.Register(
nameof(ShowClose),
typeof(bool), typeof(TitleBar), new PropertyMetadata(true));

/// <summary>
/// Property for <see cref="ShowHelp"/>
/// </summary>
Expand Down Expand Up @@ -273,16 +266,7 @@ public bool ShowMinimize
get => (bool)GetValue(ShowMinimizeProperty);
set => SetValue(ShowMinimizeProperty, value);
}

/// <summary>
/// Gets or sets information whether to show close button.
/// </summary>
public bool ShowClose
{
get => (bool)GetValue(ShowCloseProperty);
set => SetValue(ShowCloseProperty, value);
}


/// <summary>
/// Gets or sets information whether to show help button
/// </summary>
Expand Down
5 changes: 0 additions & 5 deletions src/Wpf.Ui/Styles/Controls/TitleBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@
</controls:Button>
<controls:Button
Grid.Column="4"
x:Name="PART_CloseButton"
Visibility="Collapsed"
Command="{Binding Path=TemplateButtonCommand, RelativeSource={RelativeSource TemplatedParent}}"
CommandParameter="close"
KeyboardNavigation.IsTabStop="True"
Expand All @@ -274,9 +272,6 @@
</MultiTrigger.Conditions>
<Setter TargetName="PART_RestoreButton" Property="Visibility" Value="Visible" />
</MultiTrigger>
<Trigger Property="ShowClose" Value="True">
<Setter TargetName="PART_CloseButton" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="Theme" Value="Dark">
<Setter Property="ButtonsBackground">
<Setter.Value>
Expand Down

0 comments on commit 6212d26

Please sign in to comment.