Skip to content

Commit cdf769f

Browse files
committed
Make sure multi action popup default icon is shared. fixes #291
1 parent 525ef71 commit cdf769f

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@
119119
</Setter.Value>
120120
</Setter>
121121
</Style>
122+
123+
<wpf:PackIcon x:Shared="False" x:Key="MaterialDesignMultiFloatingActionPopupBoxIcon"
124+
Kind="Plus" Width="24" Height="24" Foreground="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=wpf:PopupBox}, Path=Foreground}" />
122125

123126
<Style TargetType="{x:Type wpf:PopupBox}" x:Key="MaterialDesignMultiFloatingActionPopupBox">
124127
<Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}"/>
@@ -358,12 +361,7 @@
358361
</ControlTemplate>
359362
</Setter.Value>
360363
</Setter>
361-
<Setter Property="ToggleContent">
362-
<Setter.Value>
363-
<wpf:PackIcon Kind="Plus" Width="24" Height="24"
364-
Foreground="{DynamicResource PrimaryHueMidForegroundBrush}" />
365-
</Setter.Value>
366-
</Setter>
364+
<Setter Property="ToggleContent" Value="{StaticResource MaterialDesignMultiFloatingActionPopupBoxIcon}" />
367365
<Style.Triggers>
368366
<Trigger Property="UnfurlOrientation" Value="Horizontal">
369367
<Setter Property="ToolTipService.Placement" Value="Custom" />
@@ -377,12 +375,6 @@
377375
<Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}"/>
378376
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueLightBrush}"/>
379377
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueLightForegroundBrush}"/>
380-
<Setter Property="ToggleContent">
381-
<Setter.Value>
382-
<wpf:PackIcon Kind="Plus" Width="24" Height="24"
383-
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}" />
384-
</Setter.Value>
385-
</Setter>
386378
</Style>
387379

388380
<Style TargetType="{x:Type wpf:PopupBox}"
@@ -391,12 +383,6 @@
391383
<Setter Property="Background" Value="{DynamicResource PrimaryHueDarkBrush}"/>
392384
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueDarkBrush}"/>
393385
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueDarkForegroundBrush}"/>
394-
<Setter Property="ToggleContent">
395-
<Setter.Value>
396-
<wpf:PackIcon Kind="Plus" Width="24" Height="24"
397-
Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}" />
398-
</Setter.Value>
399-
</Setter>
400386
</Style>
401387

402388
<Style TargetType="{x:Type wpf:PopupBox}"
@@ -405,12 +391,6 @@
405391
<Setter Property="Background" Value="{DynamicResource SecondaryAccentBrush}"/>
406392
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryAccentBrush}"/>
407393
<Setter Property="Foreground" Value="{DynamicResource SecondaryAccentForegroundBrush}"/>
408-
<Setter Property="ToggleContent">
409-
<Setter.Value>
410-
<wpf:PackIcon Kind="Plus" Width="24" Height="24"
411-
Foreground="{DynamicResource SecondaryAccentForegroundBrush}" />
412-
</Setter.Value>
413-
</Setter>
414394
</Style>
415395

416396
</ResourceDictionary>

0 commit comments

Comments
 (0)