Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/Wpf.Ui/Controls/MessageBox/MessageBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Wpf.Ui.Controls">
xmlns:controls="clr-namespace:Wpf.Ui.Controls"
xmlns:converters="clr-namespace:Wpf.Ui.Converters">

<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />

<Style TargetType="{x:Type controls:MessageBox}">
<Setter Property="MaxWidth" Value="450" />
Expand Down Expand Up @@ -109,7 +112,10 @@
CommandParameter="{x:Static controls:MessageBoxButton.Primary}"
Content="{TemplateBinding PrimaryButtonText}"
Icon="{TemplateBinding PrimaryButtonIcon}"
IsDefault="True" />
IsDefault="True"
IsEnabled="{TemplateBinding IsPrimaryButtonEnabled}"
Visibility="{TemplateBinding IsPrimaryButtonEnabled,
Converter={StaticResource BoolToVisibilityConverter}}" />

<controls:Button
Grid.Column="2"
Expand All @@ -118,7 +124,10 @@
Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:MessageBox}}, Path=TemplateButtonCommand, Mode=OneTime}"
CommandParameter="{x:Static controls:MessageBoxButton.Secondary}"
Content="{TemplateBinding SecondaryButtonText}"
Icon="{TemplateBinding SecondaryButtonIcon}" />
Icon="{TemplateBinding SecondaryButtonIcon}"
IsEnabled="{TemplateBinding IsSecondaryButtonEnabled}"
Visibility="{TemplateBinding IsSecondaryButtonEnabled,
Converter={StaticResource BoolToVisibilityConverter}}" />

<controls:Button
Grid.Column="4"
Expand Down
Loading