ContextMenu Style is missing

Jun 18, 2011 at 4:43 PM
Edited Jun 18, 2011 at 4:44 PM

Hi there,

It seems that the style definition for the contextmenu is missing - at least in the ExpressionDark Theme.

To solve this, add the following xaml style definition in the ExpressionDark/Themes.xaml:

 <Style TargetType="{x:Type ContextMenu}">
        <Setter Property="SnapsToDevicePixels"
            Value="True" />
        <Setter Property="OverridesDefaultStyle"
            Value="True" />
        <Setter Property="Grid.IsSharedSizeScope"
            Value="true" />
        <Setter Property="HasDropShadow"
            Value="True" />
        <Setter Property="Template">
                <ControlTemplate TargetType="{x:Type ContextMenu}">

                    <Border x:Name="Border" Background="{StaticResource MenuPopupBrush}" BorderThickness="1">
                            <SolidColorBrush Color="{StaticResource BorderMediumColor}" />
                        <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
                        <Trigger Property="HasDropShadow" Value="true">
                            <Setter TargetName="Border" Property="Padding" Value="0,3,0,3" />
                            <Setter TargetName="Border" Property="CornerRadius" Value="4" />




Jul 22, 2014 at 7:19 PM
Signed in to drop a quick FYI. This helped me today when needing to update my expressiondark.xaml to support Context Menus. Thank you random internet stranger. You made my day.