File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
src/Wpf.Ui/Controls/MessageBox Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 88<ResourceDictionary
99 xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
1010 xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
11- xmlns : controls =" clr-namespace:Wpf.Ui.Controls" >
11+ xmlns : controls =" clr-namespace:Wpf.Ui.Controls"
12+ xmlns : converters =" clr-namespace:Wpf.Ui.Converters" >
13+
14+ <converters : BoolToVisibilityConverter x : Key =" BoolToVisibilityConverter" />
1215
1316 <Style TargetType =" {x:Type controls:MessageBox}" >
1417 <Setter Property =" MaxWidth" Value =" 450" />
109112 CommandParameter =" {x:Static controls:MessageBoxButton.Primary}"
110113 Content =" {TemplateBinding PrimaryButtonText}"
111114 Icon =" {TemplateBinding PrimaryButtonIcon}"
112- IsDefault =" True" />
115+ IsDefault =" True"
116+ IsEnabled =" {TemplateBinding IsPrimaryButtonEnabled}"
117+ Visibility =" {TemplateBinding IsPrimaryButtonEnabled,
118+ Converter={StaticResource BoolToVisibilityConverter}}" />
113119
114120 <controls : Button
115121 Grid.Column=" 2"
118124 Command =" {Binding RelativeSource={RelativeSource AncestorType={x:Type controls:MessageBox}}, Path=TemplateButtonCommand, Mode=OneTime}"
119125 CommandParameter =" {x:Static controls:MessageBoxButton.Secondary}"
120126 Content =" {TemplateBinding SecondaryButtonText}"
121- Icon =" {TemplateBinding SecondaryButtonIcon}" />
127+ Icon =" {TemplateBinding SecondaryButtonIcon}"
128+ IsEnabled =" {TemplateBinding IsSecondaryButtonEnabled}"
129+ Visibility =" {TemplateBinding IsSecondaryButtonEnabled,
130+ Converter={StaticResource BoolToVisibilityConverter}}" />
122131
123132 <controls : Button
124133 Grid.Column=" 4"
You can’t perform that action at this time.
0 commit comments