Skip to content

Commit 123a1c0

Browse files
committed
IsSplit is now automatically set by a style trigger
1 parent 1d4da47 commit 123a1c0

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
- Improved mouse wheel selection on `RibbonTabControl`
7272
- `MenuItem`
7373
- Added support for `UsesItemContainerTemplate` and `ItemContainerTemplateSelector`
74+
- `IsSplit` is now automatically set by a style trigger. If `Command` is not null and `HasItems` is true.
7475
- `DropDownButton`
7576
- Added support for `UsesItemContainerTemplate` and `ItemContainerTemplateSelector`
7677

Fluent.Ribbon.Showcase/TestContent.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,6 @@
558558
<Separator />
559559
<Fluent:MenuItem Header="Set Default Paste..."
560560
Command="Paste"
561-
IsSplit="True"
562561
KeyTip="A">
563562
<Fluent:MenuItem Header="1"
564563
Click="OnMenuItemClick" />

Fluent.Ribbon/Themes/Controls/MenuItem.xaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,13 @@
452452
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
453453
<Setter Property="Template" Value="{DynamicResource Fluent.Ribbon.Templates.MenuItem}" />
454454
<Style.Triggers>
455+
<MultiDataTrigger>
456+
<MultiDataTrigger.Conditions>
457+
<Condition Binding="{Binding Command, RelativeSource={RelativeSource Self}, Converter={x:Static converters:IsNullConverter.Instance}}" Value="False" />
458+
<Condition Binding="{Binding HasItems, RelativeSource={RelativeSource Self}}" Value="True" />
459+
</MultiDataTrigger.Conditions>
460+
<Setter Property="Fluent:MenuItem.IsSplit" Value="True" />
461+
</MultiDataTrigger>
455462
<MultiTrigger>
456463
<MultiTrigger.Conditions>
457464
<Condition Property="Fluent:MenuItem.IsSplit" Value="True" />

0 commit comments

Comments
 (0)