|
12 | 12 | <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.ToggleButton.xaml" />
|
13 | 13 | <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.Font.xaml" />
|
14 | 14 | </ResourceDictionary.MergedDictionaries>
|
| 15 | + |
| 16 | + <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> |
15 | 17 |
|
16 | 18 | <Style x:Key="MaterialDesignToolBarVerticalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
|
17 | 19 | <Setter Property="Background" Value="{DynamicResource MaterialDesignPaper}"/>
|
|
125 | 127 | <ControlTemplate TargetType="{x:Type ToolBar}">
|
126 | 128 | <DockPanel x:Name="Grid" Margin="3,1,1,1" SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
|
127 | 129 | <Grid DockPanel.Dock="Right" x:Name="OverflowGrid" HorizontalAlignment="Right">
|
128 |
| - <ToggleButton x:Name="OverflowButton" ClickMode="Press" FocusVisualStyle="{x:Null}" IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{TemplateBinding HasOverflowItems}" Style="{StaticResource MaterialDesignToolBarHorizontalOverflowButtonStyle}" |
| 130 | + <ToggleButton x:Name="OverflowButton" ClickMode="Press" FocusVisualStyle="{x:Null}" |
| 131 | + IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
| 132 | + Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HasOverflowItems, Converter={StaticResource BooleanToVisibilityConverter}}" |
| 133 | + Style="{StaticResource MaterialDesignToolBarHorizontalOverflowButtonStyle}" |
129 | 134 | Foreground="{TemplateBinding Foreground}"
|
130 | 135 | />
|
131 | 136 | <Popup x:Name="OverflowPopup" AllowsTransparency="true" Focusable="false" IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom" StaysOpen="false" Margin="1">
|
|
0 commit comments