<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:AIRS">

    <Style x:Key="menu" TargetType="{x:Type ContextMenu}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContextMenu}">
                    <Border x:Name="Border" CornerRadius="0" Background="#A5181818"  BorderThickness="2">
                        <Border.BorderBrush>
                            <SolidColorBrush Color="#BABABA" />
                        </Border.BorderBrush>
                        <ItemsPresenter/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True"/>
                            </MultiTrigger.Conditions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"  Storyboard.TargetProperty="(FrameworkElement.Width)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.0020000" Value="0"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3450000" Value="175"/>
                                        </DoubleAnimationUsingKeyFrames>
                                       
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.EnterActions>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type MenuItem}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Border Margin="1" MinWidth="80" CornerRadius="0">
                        <Border.Background>
                            <SolidColorBrush x:Name="MyAnimatedBrushBackground" Color="Transparent" />
                        </Border.Background>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text=" "/>
                            <ContentPresenter ContentSource="Icon" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            <TextBlock Text="   "/>
                            <ContentPresenter ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </StackPanel>
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True"/>
                            </MultiTrigger.Conditions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
                                            <LinearColorKeyFrame Value="Transparent" KeyTime="00:00:00.0020000" />
                                            <LinearColorKeyFrame Value="#7E9C9C9C" KeyTime="00:00:00.0320000" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
                                            <LinearColorKeyFrame Value="#7E9C9C9C" KeyTime="00:00:00.0020000" />
                                            <LinearColorKeyFrame Value="Transparent" KeyTime="00:00:00.0320000" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.ExitActions>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>