Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You need to hover over the menu (MenuItem will be selected if the menu is not empty) and press the right mouse button, select EditTemplate -> Edit a copy. A style with templates will be created.
There you will see the following code
<ControlTemplate
x:Key="{ComponentResourceKey ResourceId=SubmenuItemTemplateKey,
TypeInTargetAssembly={x:Type MenuItem}}">
<!-- Много кода -->
</ControlTemplate>
<ContentPresenter
x:Name="Icon"
Width="16"
Height="16"
Margin="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
ContentSource="Icon"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Rectangle
Width="1"
Margin="29,2,0,2"
HorizontalAlignment="Left"
Fill="{StaticResource Menu.Static.Separator}" />
<Menu
Grid.Row="0"
Height="25"
VerticalAlignment="Top"
DockPanel.Dock="Top">
<MenuItem Style="{StaticResource MenuItemStyle}" Header="Тесты">
<MenuItem
Icon="101"
Command="{Binding WorkspaceViewModel.UpdateTestsCommand}"
Header="Обновить список тестов"
IsEnabled="{Binding Mode, Converter={StaticResource ApplicationModeEnumToBooleanConverter}, ConverterParameter='Tests'}" />
<!-- -->
</MenuItem>
<MenuItem Header="Режим">
<!-- -->
</MenuItem>
</Menu>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question