Skip to content

Commit

Permalink
Update menuitem style
Browse files Browse the repository at this point in the history
  • Loading branch information
Nice3point committed Jul 4, 2023
1 parent d4a9030 commit ca5f225
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
3 changes: 2 additions & 1 deletion RevitLookup.UI/ForkModificationList.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,5 @@ New control with ItemsSourceChanged event

# Wpf.Ui.Styles.Controls.MenuItem

- Edited SubmenuItem Symbol trigger
- Edited SubmenuItem Symbol trigger
- Removed IsCheckable checkbox icon border
36 changes: 12 additions & 24 deletions RevitLookup.UI/Styles/Controls/MenuItem.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -690,29 +690,16 @@
<ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut" />
</Grid.ColumnDefinitions>

<Border
x:Name="CheckBoxIconBorder"
<TextBlock
Grid.Column="0"
Width="20"
Height="20"
Margin="0"
x:Name="CheckBoxIcon"
Visibility="Collapsed"
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderBrush="{DynamicResource ControlElevationBorderBrush}"
BorderThickness="1"
CornerRadius="4"
Visibility="Collapsed">
<Border.Background>
<SolidColorBrush Color="{DynamicResource ControlFillColorDefault}" />
</Border.Background>
<TextBlock
x:Name="CheckBoxIcon"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="{DynamicResource FluentSystemIcons}"
FontSize="16"
Text=""
TextAlignment="Center" />
</Border>
FontFamily="{DynamicResource FluentSystemIcons}"
FontSize="16"
Text="&#xF294;"
TextAlignment="Center" />

<ContentPresenter
x:Name="Icon"
Expand Down Expand Up @@ -762,11 +749,12 @@
<!-- <Setter TargetName="SymbolIcon" Property="Margin" Value="0" /> -->
</Trigger>
<Trigger Property="IsCheckable" Value="True">
<Setter TargetName="CheckBoxIconBorder" Property="Visibility" Value="Visible" />
<Setter TargetName="CheckBoxIconBorder" Property="Margin" Value="0,0,6,0" />
<Setter TargetName="CheckBoxIcon" Property="Visibility" Value="Hidden" />
<Setter TargetName="CheckBoxIcon" Property="Margin" Value="0,0,6,0" />
<Setter TargetName="SymbolIcon" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="CheckBoxIcon" Property="Text" Value="&#xF294;" />
<Setter TargetName="CheckBoxIcon" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground">
Expand Down

0 comments on commit ca5f225

Please sign in to comment.