	  
	   
    
		

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="clr-namespace:C1.WPF;assembly=C1.WPF.4" xmlns:c1_mediaPlayer="clr-namespace:C1.WPF.MediaPlayer" xmlns:c1_mediaPlayer_resources="clr-namespace:C1.Silverlight.MediaPlayer.Resources" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/C1.WPF.4;component/themes/Common.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <c1_mediaPlayer:TimeSpanConverter x:Key="TimeSpanConverter" />
    <c1_mediaPlayer:FallbackConverter x:Key="FallbackConverter" />
    <c1_mediaPlayer:HoursMinutesSecondsConverter x:Key="HoursMinutesSecondsConverter" />
    <c1_mediaPlayer:ToVisibilityConverter x:Key="ToVisibilityConverter" />
    <c1_mediaPlayer:InverseToVisibilityConverter x:Key="InverseToVisibilityConverter" />
    <c1_mediaPlayer:InverseToOpacityConverter x:Key="InverseToOpacityConverter" />
    <c1_mediaPlayer_resources:C1_Silverlight_MediaPlayer x:Key="MediaPlayerResources" />

    <!-- ******************** MediaPlayer Brushes & Styles *****************-->
    
    <!-- Brush @ MediaPlayer Background-->
    <SolidColorBrush x:Key="MplayerBackgroundBrush" Color="#D8D1DCE8" />
    <SolidColorBrush x:Key="WpfMplayerBackgroundBrush" Color="#FFDCDCDC" />

    <!-- CornerRadius @ MediaPlayer -->
    <CornerRadius x:Key="MplayerCornerRadius">3</CornerRadius>
    <!-- CornerRadius @ MediaPlayer InnerBorder-->
    <CornerRadius x:Key="MplayerInnerBorderCornerRadius">2</CornerRadius>

    <!-- Brush @ MediaPlayer Video Screen -->
    <SolidColorBrush x:Key="MplayerVideoScreenBrush" Color="Black" />

    <!-- TextBlock @ MediaPlayer PlayList -->
    <Style x:Key="MplayerListTextBlock" TargetType="TextBlock" />
    <!-- TextBlock @ MediaPlayer PlayList Title -->
    <Style x:Key="MplayerListTitleBlock" TargetType="TextBlock" />

    <!-- Brush @ MediaPlayer UnPlay & Pause Template Buttons Background-->
    <LinearGradientBrush x:Key="MplayerStatesButtonBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#7FFFFFFF" Offset="0" />
        <GradientStop Color="#19FFFFFF" Offset="0.49" />
        <GradientStop Color="Transparent" Offset="0.51" />
        <GradientStop Color="#7FFFFFFF" Offset="1" />
    </LinearGradientBrush>
    <!-- Brush @ MediaPlayer UnPlay & Pause Template Buttons Background on MouseOver-->
    <LinearGradientBrush x:Key="MplayerStatesButtonOverBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#B2FFFFFF" Offset="0" />
        <GradientStop Color="#33FFFFFF" Offset="0.49" />
        <GradientStop Color="Transparent" Offset="0.51" />
        <GradientStop Color="#B2FFFFFF" Offset="1" />
    </LinearGradientBrush>

    <!-- Brush @ MediaPlayer Loading, UnPlay & Pause Template Icons-->
    <LinearGradientBrush x:Key="MplayerStatesIconBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#E5FFFFFF" Offset="0.333" />
        <GradientStop Color="#B2FFFFFF" Offset="0.66" />
    </LinearGradientBrush>

    <!-- Color & Brush @ MediaPlayer Icon -->
    <Color x:Key="MplayerIconColor">#FF0094B3</Color>
    <SolidColorBrush x:Key="MplayerIconBrush" Color="{StaticResource MplayerIconColor}" />

    <!-- Thickness @ MediaPlayer Pannel Buttons -->
    <Thickness x:Key="MplayerButtonThickness">1</Thickness>
    <Thickness x:Key="MplayerVolumePanelBorderThickness">1</Thickness>

    <!-- CornerRadius @ MediaPlayer Panel Buttons -->
    <CornerRadius x:Key="MplayerButtonOuterCornerRadius">2</CornerRadius>
    <CornerRadius x:Key="MplayerButtonCornerRadius">1</CornerRadius>
    <CornerRadius x:Key="MplayerButtonInnerCornerRadius">0</CornerRadius>
    <CornerRadius x:Key="MplayerVolumePanelCornerRadius">1</CornerRadius>


    <!-- Brush @ MediaPlayer Icons Background -->
    <LinearGradientBrush x:Key="MplayerButtonIconBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF0990AE" Offset="0.2" />
        <GradientStop Color="#FF72BED3" Offset="0.7" />
        <GradientStop Color="#FF0990AE" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="WpfMplayerButtonIconBrush" Color="#FF444444" />

    <!-- Brush @ MediaPlayer Volume Control Background -->
    <SolidColorBrush x:Key="MplayerVolumeControlBrush" Color="#FFFAFBFC" />

    <!-- Brush @ MplayerTimelineSliderTemplate Background -->
    <LinearGradientBrush x:Key="MplayerTimelineBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        
        
        <GradientStop Color="#FFA0A0A0" Offset="0.3" />
    </LinearGradientBrush>
    <!-- Brush @ MplayerTimelineSliderTemplate Border -->
    
    
    <SolidColorBrush x:Key="MplayerTimelineBorderBrush" Color="Gray" />
    <!-- Brush @ MplayerTimelineSLiderTemplate ElapsedTime Background -->
    <LinearGradientBrush x:Key="MplayerTimeLineElapsedTimeBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF8ED1E2" Offset="0.3" />
        <GradientStop Color="#FFBDE2EB" Offset="0.3" />
    </LinearGradientBrush>
    <!-- Brush @ MplayerTimelineSliderTemplate Elapsed Time Border -->
    <SolidColorBrush x:Key="MplayerTimeLineElapsedTimeBorderBrush" Color="#FFBDE2EB" />


    <!-- Brush @ MediaPlayer PlayList Separator -->
    <LinearGradientBrush x:Key="MplayerPlayListSeparatorBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#19000000" Offset="0.5" />
        <GradientStop Color="#7FFFFFFF" Offset="0.5" />
    </LinearGradientBrush>

    <!-- ButtonBase @ C1MediaPlayer Control Panel-->
	 <Style x:Key="MplayerCommonButtonBase" TargetType="ButtonBase">
        <Setter Property="Padding" Value="2" />
        <Setter Property="BorderThickness" Value="{StaticResource MplayerButtonThickness}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ButtonBase">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PressedElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                        <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource GeneralGradientOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                        <c1:C1BrushBuilder x:Name="PressedBrush" Input="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" DesignBrush="{StaticResource GeneralGradientSelectedBackground}" DesignColor="{StaticResource SelectedColor}" />
                        <c1:C1BrushBuilder x:Name="InnerBorderBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource InnerBorderBrush}" DesignColor="{StaticResource BaseColor}" />
                        <c1:C1BrushBuilder x:Name="InnerBorderMouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource InnerBorderMouseOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                        <c1:C1BrushBuilder x:Name="InnerBorderPressedBrush" Input="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" DesignBrush="{StaticResource InnerBorderPressedBrush}" DesignColor="{StaticResource SelectedColor}" />
                        <c1:C1BrushBuilder x:Name="CheckedBrush" Input="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" DesignBrush="{StaticResource GeneralGradientCheckedBrush}" DesignColor="{StaticResource SelectedColor}" />
                        <Border x:Name="OuterBorderElement" Width="22" Height="22" BorderBrush="{Binding ElementName=InnerBorderBrush, Path=Output}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerButtonOuterCornerRadius}">
                            <Grid>
                                <Border x:Name="BackgroundElement" Background="{Binding ElementName=BackgroundBrush, Path=Output}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource MplayerButtonCornerRadius}">
                                    <Border BorderBrush="{Binding ElementName=InnerBorderBrush, Path=Output}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerButtonInnerCornerRadius}" />
                                </Border>
                                <Border x:Name="MouseOverElement" Background="{Binding ElementName=MouseOverBrush, Path=Output}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource MplayerButtonCornerRadius}" Visibility="Collapsed">
                                    <Border BorderBrush="{Binding ElementName=InnerBorderMouseOverBrush, Path=Output}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerButtonInnerCornerRadius}" />
                                </Border>
                                <Border x:Name="PressedElement" Background="{Binding ElementName=PressedBrush, Path=Output}" BorderBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource MplayerButtonCornerRadius}" Visibility="Collapsed">
                                    <Border BorderBrush="{Binding ElementName=InnerBorderPressedBrush, Path=Output}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerButtonInnerCornerRadius}" />
                                </Border>
                                <Border x:Name="CheckedElement" Background="{Binding ElementName=CheckedBrush, Path=Output}" BorderBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource MplayerButtonCornerRadius}" Visibility="Collapsed" />
                                <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                <Border x:Name="FocusVisualElement" BorderBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource MplayerButtonCornerRadius}" IsHitTestVisible="false" Visibility="Collapsed" />
                                <Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" CornerRadius="{StaticResource MplayerButtonCornerRadius}" IsHitTestVisible="False" Visibility="Collapsed" />
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Play ToggleButton @ C1MediaPlayer Control Panel-->
    <Style x:Key="MplayerPlayButton" TargetType="ToggleButton">
        <Setter Property="Padding" Value="2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ButtonBase">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PressedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="icoplay" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="icopause" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                        <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource GeneralGradientOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                        <c1:C1BrushBuilder x:Name="PressedBrush" Input="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" DesignBrush="{StaticResource GeneralGradientSelectedBackground}" DesignColor="{StaticResource SelectedColor}" />
                        <c1:C1BrushBuilder x:Name="InnerBorderBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource InnerBorderBrush}" DesignColor="{StaticResource BaseColor}" />
                        <c1:C1BrushBuilder x:Name="InnerBorderMouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource InnerBorderMouseOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                        <c1:C1BrushBuilder x:Name="InnerBorderPressedBrush" Input="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" DesignBrush="{StaticResource InnerBorderPressedBrush}" DesignColor="{StaticResource SelectedColor}" />
                        <Border x:Name="OuterBorderElement" Width="32" Height="28" BorderBrush="{Binding ElementName=InnerBorderBrush, Path=Output}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerButtonOuterCornerRadius}">
                            <Grid>
                                <Border x:Name="BackgroundElement" Background="{Binding ElementName=BackgroundBrush, Path=Output}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource MplayerButtonCornerRadius}">
                                    <Border BorderBrush="{Binding ElementName=InnerBorderBrush, Path=Output}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerButtonInnerCornerRadius}" />
                                </Border>
                                <Border x:Name="MouseOverElement" Background="{Binding ElementName=MouseOverBrush, Path=Output}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource MplayerButtonCornerRadius}" Visibility="Collapsed">
                                    <Border BorderBrush="{Binding ElementName=InnerBorderMouseOverBrush, Path=Output}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerButtonInnerCornerRadius}" />
                                </Border>
                                <Border x:Name="PressedElement" Background="{Binding ElementName=PressedBrush, Path=Output}" BorderBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource MplayerButtonCornerRadius}" Visibility="Collapsed">
                                    <Border BorderBrush="{Binding ElementName=InnerBorderPressedBrush, Path=Output}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerButtonInnerCornerRadius}" />
                                </Border>
                                <Path x:Name="icopause" Data="M11.5,1.02811E-08 L11.628656,0.0024657547 C12.949663,0.053216022 14,0.88103408 14,1.8947369 L14,16.105265 C14,17.151667 12.880777,18 11.5,18 C10.11925,18 9,17.151676 9,16.105265 L9,1.8947369 C9,0.8810252 10.050364,0.053215463 11.371345,0.0024657547 z M2.5,0 C3.880796,6.3110804E-08 5,0.8483296 5,1.8947369 L5,16.105265 C5,17.151661 3.8807883,18 2.5,18 C1.1191955,18 0,17.151619 0,16.105265 L0,1.8947369 C0,0.84837353 1.1191878,6.3110804E-08 2.5,0 z" Fill="{TemplateBinding Foreground}" Stretch="Fill" Width="14" Height="18" Visibility="Collapsed" />
                                <Path x:Name="icoplay" Stretch="Uniform" Data="M1,2.8309214 C0.95346516,1.1423991 2.7568073,0.40946418 4.2441177,1.4446989 L15,8.48909 C16.140579,9.3145008 17,9.886631 17,10.9912 L17,11.008795 C17,12.113363 16.109327,12.728537 15,13.4904 L4.1752372,20.655039 C2.9820821,21.484116 1.0097007,20.864441 1,18.887381 z" Width="14" Height="18" Fill="{TemplateBinding Foreground}" />
                                <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Visibility="Collapsed" />
                                <Border x:Name="FocusVisualElement" BorderBrush="{TemplateBinding c1:ClearStyleExtensions.FocusBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource GeneralCornerRadius}" IsHitTestVisible="false" Visibility="Collapsed" />
                                <Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" CornerRadius="{StaticResource MplayerButtonCornerRadius}" IsHitTestVisible="False" Visibility="Collapsed" />
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Button @ MediaPlayer Unplay & Pause Template-->
    <Style x:Key="MplayerUnPlayButton" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid Width="100" Height="100" Margin="{TemplateBinding Margin}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00" Value="0.4" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00" Value="0.4" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Ellipse x:Name="Background" Fill="{Binding Background}" Opacity="0.5" />
                        <Ellipse x:Name="BackgroundMask" Fill="{StaticResource MplayerStatesButtonBrush}" Stroke="{Binding Background}" StrokeThickness="3" Opacity="0.5" />
                        <Ellipse x:Name="MouseOverElement" Fill="{StaticResource MplayerStatesButtonOverBrush}" Stroke="{StaticResource MplayerStatesIconBorderBrush}" StrokeThickness="3" Opacity="0" />
                        <Ellipse Height="42" Margin="18,8,18,0" VerticalAlignment="Top">
                            <Ellipse.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#7FFFFFFF" Offset="0" />
                                    <GradientStop Color="#19FFFFFF" Offset="1" />
                                </LinearGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>
                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                        <Ellipse x:Name="DisabledVisualElement" Fill="{StaticResource DisabledBrush}" IsHitTestVisible="False" Opacity="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--******************** MediaPlayer ScrollBar *******************-->

    <Style x:Key="MplayerScrollbar" TargetType="ScrollBar">
        <Setter Property="MinWidth" Value="10" />
        <Setter Property="MinHeight" Value="10" />
        <Setter Property="IsTabStop" Value="False" />
        
         
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollBar">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="{x:Type RepeatButton}">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Visible</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Visible</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Visible</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{Binding Background}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                                    <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{StaticResource MouseOverBrush}" DesignBrush="{StaticResource GeneralVGradientOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                                    <c1:C1BrushBuilder x:Name="IconBackgroundBrush" Input="{StaticResource MplayerIconBrush}" DesignBrush="{StaticResource MplayerButtonIconBrush}" DesignColor="{StaticResource MplayerIconColor}" />
                                    <Border x:Name="BackgroundElement" Background="{Binding Output, ElementName=BackgroundBrush}" BorderBrush="{Binding BorderBrush}" BorderThickness="1" />
                                    <Border x:Name="MouseOverElement" Background="{Binding Output, ElementName=MouseOverBrush}" BorderThickness="1" Visibility="Collapsed" />
                                    <Path Stretch="Fill" Height="4" Width="9" Margin="1" Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z " Fill="{Binding Output, ElementName=IconBackgroundBrush}" StrokeThickness="1" />
                                    <Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" IsHitTestVisible="False" Visibility="Collapsed" />
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="{x:Type RepeatButton}">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Visible</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Visible</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <Visibility>Visible</Visibility>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{Binding Background}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                                    <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{StaticResource MouseOverBrush}" DesignBrush="{StaticResource GeneralVGradientOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                                    <c1:C1BrushBuilder x:Name="IconBackgroundBrush" Input="{StaticResource MplayerIconBrush}" DesignBrush="{StaticResource MplayerButtonIconBrush}" DesignColor="{StaticResource MplayerIconColor}" />
                                    <Border x:Name="BackgroundElement" Background="{Binding Output, ElementName=BackgroundBrush}" BorderBrush="{Binding BorderBrush}" BorderThickness="1" />
                                    <Border x:Name="MouseOverElement" Background="{Binding Output, ElementName=MouseOverBrush}" BorderThickness="1" Visibility="Collapsed" />
                                    <Path Stretch="Fill" Height="4" Width="9" Margin="1" Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z " Fill="{Binding Output, ElementName=IconBackgroundBrush}" StrokeThickness="1" />
                                    <Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" IsHitTestVisible="False" Visibility="Collapsed" />
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <Grid x:Name="Bg" SnapsToDevicePixels="true">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="10" />
                                <RowDefinition Height="0.00001*" />
                                <RowDefinition Height="10" />
                            </Grid.RowDefinitions>
                            <RepeatButton Command="{x:Static ScrollBar.LineUpCommand}" Template="{StaticResource VerticalDecrementTemplate}" />
                            <Track x:Name="PART_Track" IsDirectionReversed="true" Grid.Row="1" Opacity="0" />
                            <RepeatButton Command="{x:Static ScrollBar.LineDownCommand}" Grid.Row="2" Template="{StaticResource VerticalIncrementTemplate}" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Width" Value="Auto" />
                <Setter Property="MinWidth" Value="0" />
                <Setter Property="Height" Value="Auto" />
                <Setter Property="MinHeight" Value="0" />
                <Setter Property="Background" Value="Red" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ScrollBar}">
                            <ControlTemplate.Resources>
                                <ControlTemplate x:Key="HorizontalDecrementTemplate" TargetType="{x:Type RepeatButton}">
                                    <Grid x:Name="Root">
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualState x:Name="Normal" />
                                                <VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <Visibility>Visible</Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <Visibility>Visible</Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <Visibility>Visible</Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{Binding Background}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                                        <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{StaticResource MouseOverBrush}" DesignBrush="{StaticResource GeneralVGradientOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                                        <c1:C1BrushBuilder x:Name="InnerBorderBrush" Input="{Binding Background}" DesignBrush="{StaticResource InnerBorderBrush}" DesignColor="{StaticResource BaseColor}" />
                                        <c1:C1BrushBuilder x:Name="IconBackgroundBrush" Input="{StaticResource MplayerIconBrush}" DesignBrush="{StaticResource MplayerButtonIconBrush}" DesignColor="{StaticResource MplayerIconColor}" />
                                        <Border x:Name="BackgroundElement" Background="{Binding Output, ElementName=BackgroundBrush}" BorderBrush="{Binding BorderBrush}" BorderThickness="1" />
                                        <Border x:Name="MouseOverElement" Background="{Binding Output, ElementName=MouseOverBrush}" BorderThickness="1" Visibility="Collapsed" />
                                        <Path Stretch="Fill" Height="9" Width="4" Margin="1" Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 z" Fill="{Binding Output, ElementName=IconBackgroundBrush}" StrokeThickness="1" />
                                        <Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" IsHitTestVisible="False" Visibility="Collapsed" />
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="HorizontalIncrementTemplate" TargetType="{x:Type RepeatButton}">
                                    <Grid x:Name="Root">
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualState x:Name="Normal" />
                                                <VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <Visibility>Visible</Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <Visibility>Visible</Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <Visibility>Visible</Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{Binding Background}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                                        <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{StaticResource MouseOverBrush}" DesignBrush="{StaticResource GeneralVGradientOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                                        <c1:C1BrushBuilder x:Name="InnerBorderBrush" Input="{Binding Background}" DesignBrush="{StaticResource InnerBorderBrush}" DesignColor="{StaticResource BaseColor}" />
                                        <c1:C1BrushBuilder x:Name="IconBackgroundBrush" Input="{StaticResource MplayerIconBrush}" DesignBrush="{StaticResource MplayerButtonIconBrush}" DesignColor="{StaticResource MplayerIconColor}" />
                                        <Border x:Name="BackgroundElement" Background="{Binding Output, ElementName=BackgroundBrush}" BorderBrush="{Binding BorderBrush}" BorderThickness="1" />
                                        <Border x:Name="MouseOverElement" Background="{Binding Output, ElementName=MouseOverBrush}" BorderThickness="1" Visibility="Collapsed" />
                                        <Path Stretch="Fill" Height="9" Width="4" Margin="1" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 z" Fill="{Binding Output, ElementName=IconBackgroundBrush}" StrokeThickness="1" />
                                        <Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" IsHitTestVisible="False" Visibility="Collapsed" />
                                    </Grid>
                                </ControlTemplate>
                            </ControlTemplate.Resources>
                            <Grid x:Name="Bg" SnapsToDevicePixels="true">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="10" />
                                    <ColumnDefinition Width="0.00001*" />
                                    <ColumnDefinition Width="10" />
                                </Grid.ColumnDefinitions>
                                <RepeatButton Width="10" Command="{x:Static ScrollBar.LineLeftCommand}" Template="{StaticResource HorizontalDecrementTemplate}" />
                                <Track x:Name="PART_Track" Grid.Column="1" Opacity="0" />
                                <RepeatButton Grid.Column="2" Width="10" Command="{x:Static ScrollBar.LineRightCommand}" Template="{StaticResource HorizontalIncrementTemplate}" />
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!-- Validation -->
    <ControlTemplate x:Key="ValidationToolTipTemplate">
        <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0" />
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25" />
            </Grid.RenderTransform>
            <Border Margin="4,4,-4,-4" Background="#052A2E31" CornerRadius="5" />
            <Border Margin="3,3,-3,-3" Background="#152A2E31" CornerRadius="4" />
            <Border Margin="2,2,-2,-2" Background="#252A2E31" CornerRadius="3" />
            <Border Margin="1,1,-1,-1" Background="#352A2E31" CornerRadius="2" />
            <Border Background="#FFDC000C" CornerRadius="2" />
            <Border CornerRadius="2">
                <TextBlock Margin="8,4,8,4" MaxWidth="250" Foreground="White" Text="{Binding (Validation.Errors)[0].Exception.Message}" TextWrapping="Wrap" />
            </Border>
        </Grid>
    </ControlTemplate>

    <!--******************** TimeLine Slider *******************-->

    <ControlTemplate x:Key="MplayerTimelineSliderTemplate" TargetType="c1_mediaPlayer:C1MoveToPointSlider">
        <Grid Height="5" Margin="1 0 0 0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="MouseOver" />
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="border">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused" />
                    <VisualState x:Name="Unfocused" />
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
                <ColumnDefinition x:Name="FullColumnDefinition" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition x:Name="EmptyColumnDefinition" />
            </Grid.ColumnDefinitions>
            <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{Binding Background}" DesignBrush="{StaticResource MplayerTimelineBrush}" DesignColor="{StaticResource BaseColor}" />
            <c1:C1BrushBuilder x:Name="BorderBrush" Input="{Binding BorderBrush}" DesignBrush="{StaticResource MplayerTimelineBorderBrush}" DesignColor="{StaticResource BaseColor}" />
            <c1:C1BrushBuilder x:Name="InnerBorderBrush" Input="{Binding Background}" DesignBrush="{StaticResource InnerBorderBrush}" DesignColor="{StaticResource BaseColor}" />
            <c1:C1BrushBuilder x:Name="ElapsedTimeBackground" Input="{Binding ButtonForeground}" DesignBrush="{StaticResource MplayerTimeLineElapsedTimeBrush}" DesignColor="{StaticResource SelectedColor}" />
            <c1:C1BrushBuilder x:Name="ElapsedTimeTimeBrush" Input="{Binding ButtonForeground}" DesignBrush="{StaticResource MplayerTimeLineElapsedTimeBorderBrush}" DesignColor="{StaticResource SelectedColor}" />
            <Border Grid.ColumnSpan="3" BorderThickness="0 0 1 1" BorderBrush="{Binding ElementName=InnerBorderBrush, Path=Output}">
                <Border BorderThickness="1" Background="{Binding ElementName=BackgroundBrush, Path=Output}" BorderBrush="{Binding ElementName=BorderBrush, Path=Output}" />
            </Border>
            <Border Margin="0 -1 0 0" BorderBrush="{Binding ElementName=ElapsedTimeBackground, Path=Output}" BorderThickness="1">
                <Border BorderThickness="0 1 1 0" Background="{Binding ElementName=ElapsedTimeBackground, Path=Output}" BorderBrush="{Binding ElementName=ElapsedTimeTimeBrush, Path=Output}" />
            </Border>
            <Border x:Name="border" Grid.ColumnSpan="3" Background="{StaticResource DisabledBrush}" Margin="0,0,1,1" Visibility="Collapsed" />
        </Grid>
    </ControlTemplate>

    <!--******************** Volume Control *******************-->

    <!-- Mute CheckBox -->
    <Style x:Key="MplayerSoundCheckBox" TargetType="CheckBox">
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="Padding" Value="4,1,0,0" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CheckBox">
                	<Grid>
                		<VisualStateManager.VisualStateGroups>
	                            <VisualStateGroup x:Name="CommonStates">
	                                <VisualState x:Name="Normal" />
	                                <VisualState x:Name="MouseOver" />
	                                <VisualState x:Name="Pressed" />
	                                <VisualState x:Name="Disabled">
	                                    <Storyboard>
	                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)">
	                                            <DiscreteObjectKeyFrame KeyTime="0">
	                                                <DiscreteObjectKeyFrame.Value>
	                                                    <Visibility>Visible</Visibility>
	                                                </DiscreteObjectKeyFrame.Value>
	                                            </DiscreteObjectKeyFrame>
	                                        </ObjectAnimationUsingKeyFrames>
	                                    </Storyboard>
	                                </VisualState>
	                            </VisualStateGroup>
	                            <VisualStateGroup x:Name="CheckStates">
	                                <VisualState x:Name="Checked">
	                                    <Storyboard>
	                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="(UIElement.Visibility)">
	                                            <DiscreteObjectKeyFrame KeyTime="0">
	                                                <DiscreteObjectKeyFrame.Value>
	                                                    <Visibility>Collapsed</Visibility>
	                                                </DiscreteObjectKeyFrame.Value>
	                                            </DiscreteObjectKeyFrame>
	                                        </ObjectAnimationUsingKeyFrames>
	                                    </Storyboard>
	                                </VisualState>
	                                <VisualState x:Name="Unchecked" />
	                                <VisualState x:Name="Indeterminate">
	                                    <Storyboard>
	                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Visibility)">
	                                            <DiscreteObjectKeyFrame KeyTime="0">
	                                                <DiscreteObjectKeyFrame.Value>
	                                                    <Visibility>Collapsed</Visibility>
	                                                </DiscreteObjectKeyFrame.Value>
	                                            </DiscreteObjectKeyFrame>
	                                        </ObjectAnimationUsingKeyFrames>
	                                    </Storyboard>
	                                </VisualState>
	                            </VisualStateGroup>
	                            <VisualStateGroup x:Name="FocusStates">
	                                <VisualState x:Name="Focused" />
	                                <VisualState x:Name="Unfocused" />
	                            </VisualStateGroup>
	                            <VisualStateGroup x:Name="ValidationStates">
	                                <VisualState x:Name="Valid" />
	                                <VisualState x:Name="InvalidUnfocused">
	                                    <Storyboard>
	                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="(UIElement.Visibility)">
	                                            <DiscreteObjectKeyFrame KeyTime="0">
	                                                <DiscreteObjectKeyFrame.Value>
	                                                    <Visibility>Collapsed</Visibility>
	                                                </DiscreteObjectKeyFrame.Value>
	                                            </DiscreteObjectKeyFrame>
	                                        </ObjectAnimationUsingKeyFrames>
	                                    </Storyboard>
	                                </VisualState>
	                                <VisualState x:Name="InvalidFocused" />
	                            </VisualStateGroup>
	                        </VisualStateManager.VisualStateGroups>
	                    <Grid Height="12" Margin="2,0">
	                        <Grid.ColumnDefinitions>
	                            <ColumnDefinition Width="9" />
	                            <ColumnDefinition Width="6" />
	                        </Grid.ColumnDefinitions>
	                        <Border Background="Transparent" Grid.ColumnSpan="2" />
	                        <Border x:Name="ValidationErrorElement" Margin="1" Visibility="Collapsed" BorderBrush="#FFDB000C" BorderThickness="1" CornerRadius="1" ToolTipService.PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
	                            <ToolTipService.ToolTip>
	                                <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
	                                    <ToolTip.Template>
	                                        <ControlTemplate>
	                                            <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
	                                                <VisualStateManager.VisualStateGroups>
	                                                    <VisualStateGroup x:Name="OpenStates">
	                                                        <VisualStateGroup.Transitions>
	                                                            <VisualTransition GeneratedDuration="0" />
	                                                            <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
	                                                                <Storyboard>
	                                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
	                                                                        <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0" />
	                                                                    </DoubleAnimationUsingKeyFrames>
	                                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
	                                                                        <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
	                                                                    </DoubleAnimationUsingKeyFrames>
	                                                                </Storyboard>
	                                                            </VisualTransition>
	                                                        </VisualStateGroup.Transitions>
	                                                        <VisualState x:Name="Closed">
	                                                            <Storyboard>
	                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
	                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0" />
	                                                                </DoubleAnimationUsingKeyFrames>
	                                                            </Storyboard>
	                                                        </VisualState>
	                                                        <VisualState x:Name="Open">
	                                                            <Storyboard>
	                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
	                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0" />
	                                                                </DoubleAnimationUsingKeyFrames>
	                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
	                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="1" />
	                                                                </DoubleAnimationUsingKeyFrames>
	                                                            </Storyboard>
	                                                        </VisualState>
	                                                    </VisualStateGroup>
	                                                </VisualStateManager.VisualStateGroups>
	                                                <Grid.RenderTransform>
	                                                    <TranslateTransform x:Name="xform" X="-25" />
	                                                </Grid.RenderTransform>
	                                                <Border Margin="4 4 -4 -4" Background="#052A2E31" CornerRadius="5" />
	                                                <Border Margin="3 3 -3 -3" Background="#152A2E31" CornerRadius="4" />
	                                                <Border Margin="2 2 -2 -2" Background="#252A2E31" CornerRadius="3" />
	                                                <Border Margin="1 1 -1 -1" Background="#352A2E31" CornerRadius="2" />
	                                                <Border Background="#FFDC000C" CornerRadius="{StaticResource GeneralCornerRadius}" />
	                                                <Border CornerRadius="2">
	                                                    <TextBlock Margin="8 4" MaxWidth="250" Foreground="White" Text="{Binding (Validation.Errors)[0].Exception.Message}" TextWrapping="Wrap" />
	                                                </Border>
	                                            </Grid>
	                                        </ControlTemplate>
	                                    </ToolTip.Template>
	                                </ToolTip>
	                            </ToolTipService.ToolTip>
	                            <Grid Height="10" HorizontalAlignment="Right" Margin="0 -4 -4 0" VerticalAlignment="Top" Width="10" Background="Transparent">
	                                <Path Fill="#FFDC000C" Margin="0 3 0 0" Data="M 1,0 L5,0 A 2,2 90 0 1 7,2 L7,6 z" />
	                                <Path Fill="#ffffff" Margin="0 3 0 0" Data="M 0,0 L2,0 L 7,5 L7,7" />
	                            </Grid>
	                        </Border>
	                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="6,1,0,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Visibility="Collapsed" />
	                        <Path Data="M6,0 C6.5522847,0 7,0.37309602 7,0.83333325 L7,9.166667 C7,9.6269045 6.5522847,10 6,10 C5.4477153,10 2.0182803,6.666666 2.0182803,6.666666 L0,6.666666 L0,3.3333325 L2.0182803,3.3333325 C2.0182803,3.3333325 5.4649744,0 6,0 z" Fill="{TemplateBinding Foreground}" Margin="1" Width="7" Height="10" />
	                        <Grid x:Name="CheckIcon" Grid.Column="1">
	                            <Path Data="M0,3 L0.0038369894,3.0009003 C1.1430449,3.2863545 2,4.5206323 2,6 C2,7.4793682 1.1430449,8.7136459 0.0038369894,8.9990997 L0,9 L0,7.9242754 L0.015750289,7.9170241 C0.59010428,7.6308961 0.99999994,6.8805761 0.99999994,6 C0.99999994,5.1194239 0.59010428,4.3691044 0.015750289,4.0829763 L0,4.0757256 z M0.99999994,0 L1.0630007,0.023530722 C3.3604174,0.91555667 5,3.2547362 5,6 C5,8.7452641 3.3604174,11.084443 1.0630007,11.976469 L0.99999994,12 L0.99999994,10.860509 L1.057683,10.83375 C2.7927208,10.0019 4,8.1504564 4,6 C4,3.8495431 2.7927208,1.9981002 1.057683,1.1662498 L0.99999994,1.1394904 z" Fill="{TemplateBinding Foreground}" Stretch="None" Margin="0,0,1,0" Width="5" Height="12" />
	                        </Grid>
	                    </Grid>
						<Border x:Name="DisabledVisualElement" Background="{StaticResource DisabledBrush}" CornerRadius="2,0,0,2" Visibility="Collapsed" />
					</Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Volume Slider -->
    <ControlTemplate x:Key="MplayerVolumeSliderTemplate" TargetType="c1_mediaPlayer:C1MoveToPointSlider">
    	<Grid>
    		<VisualStateManager.VisualStateGroups>
				<VisualStateGroup x:Name="CommonStates">
					<VisualState x:Name="Normal" />
					<VisualState x:Name="MouseOver" />
	                <VisualState x:Name="Disabled">
	                    <Storyboard>
	                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DisabledVisualElement">
	                            <DiscreteObjectKeyFrame KeyTime="0">
	                                <DiscreteObjectKeyFrame.Value>
	                                    <Visibility>Visible</Visibility>
	                                </DiscreteObjectKeyFrame.Value>
	                            </DiscreteObjectKeyFrame>
	                        </ObjectAnimationUsingKeyFrames>
	                    </Storyboard>
	                </VisualState>
	            </VisualStateGroup>
	            <VisualStateGroup x:Name="FocusStates">
	               <VisualState x:Name="Focused" />
	               <VisualState x:Name="Unfocused" />
	            </VisualStateGroup>
	        </VisualStateManager.VisualStateGroups>
	        <Grid Width="32" Height="12" Background="Transparent" Margin="0,0,3,0">
	            <Grid.ColumnDefinitions>
	                <ColumnDefinition x:Name="FullColumnDefinition" />
	                <ColumnDefinition x:Name="EmptyColumnDefinition" />
	            </Grid.ColumnDefinitions>
	            <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{Binding Background}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
	            <Path x:Name="Background" Grid.Column="1" Height="12" Width="32" Data="M1,10 C1.5,10 2,10.5 2,11 C2,11.5 1.5,12 1,12 C0.5,12 0,11.5 0,11 C0,10.5 0.5,10 1,10 z M4,9 C4.5,9 5,9.5 5,10 L5,11 C5,11.5 4.5,12 4,12 C3.5,12 3,11.5 3,11 L3,10 C3,9.5 3.5,9 4,9 z M7,8 C7.5,8 8,8.5 8,9 L8,11 C8,11.5 7.5,12 7,12 C6.5,12 6,11.5 6,11 L6,9 C6,8.5 6.5,8 7,8 z M10,7 C10.5,7 11,7.5 11,8 L11,11 C11,11.5 10.5,12 10,12 C9.5,12 9,11.5 9,11 L9,8 C9,7.5 9.5,7 10,7 z M13,6 C13.5,6 14,6.5 14,7 L14,11 C14,11.5 13.5,12 13,12 C12.5,12 12,11.5 12,11 L12,7 C12,6.5 12.5,6 13,6 z M16,5 C16.5,5 17,5.5 17,6 L17,11 C17,11.5 16.5,12 16,12 C15.5,12 15,11.5 15,11 L15,6 C15,5.5 15.5,5 16,5 z M19,4 C19.5,4 20,4.5 20,5 L20,11 C20,11.5 19.5,12 19,12 C18.5,12 18,11.5 18,11 L18,5 C18,4.5 18.5,4 19,4 z M22,3 C22.5,3 23,3.5 23,4 L23,11 C23,11.5 22.5,12 22,12 C21.5,12 21,11.5 21,11 L21,4 C21,3.5 21.5,3 22,3 z M25,2 C25.5,2 26,2.5 26,3 L26,11 C26,11.5 25.5,12 25,12 C24.5,12 24,11.5 24,11 L24,3 C24,2.5 24.5,1.9999995 24.999998,1.9999995 z M28,1 C28.5,1 29,1.5 29,2 L29,11 C29,11.5 28.5,11.999996 28,12 C27.5,11.999996 27,11.5 27,11 L27,2 C27,1.5 27.5,1 28,1 z M31,0 C31.5,0 32,0.5 32,1 L32,11 C32,11.5 31.5,12 31,12 C30.5,12 30,11.5 30,11 L30,1 C30,0.5 30.5,0 31,0 z" Stretch="None" HorizontalAlignment="Right" Fill="{TemplateBinding Background}" />
	            <Path x:Name="Volume" Height="12" Width="32" Data="M1,10 C1.5,10 2,10.5 2,11 C2,11.5 1.5,12 1,12 C0.5,12 0,11.5 0,11 C0,10.5 0.5,10 1,10 z M4,9 C4.5,9 5,9.5 5,10 L5,11 C5,11.5 4.5,12 4,12 C3.5,12 3,11.5 3,11 L3,10 C3,9.5 3.5,9 4,9 z M7,8 C7.5,8 8,8.5 8,9 L8,11 C8,11.5 7.5,12 7,12 C6.5,12 6,11.5 6,11 L6,9 C6,8.5 6.5,8 7,8 z M10,7 C10.5,7 11,7.5 11,8 L11,11 C11,11.5 10.5,12 10,12 C9.5,12 9,11.5 9,11 L9,8 C9,7.5 9.5,7 10,7 z M13,6 C13.5,6 14,6.5 14,7 L14,11 C14,11.5 13.5,12 13,12 C12.5,12 12,11.5 12,11 L12,7 C12,6.5 12.5,6 13,6 z M16,5 C16.5,5 17,5.5 17,6 L17,11 C17,11.5 16.5,12 16,12 C15.5,12 15,11.5 15,11 L15,6 C15,5.5 15.5,5 16,5 z M19,4 C19.5,4 20,4.5 20,5 L20,11 C20,11.5 19.5,12 19,12 C18.5,12 18,11.5 18,11 L18,5 C18,4.5 18.5,4 19,4 z M22,3 C22.5,3 23,3.5 23,4 L23,11 C23,11.5 22.5,12 22,12 C21.5,12 21,11.5 21,11 L21,4 C21,3.5 21.5,3 22,3 z M25,2 C25.5,2 26,2.5 26,3 L26,11 C26,11.5 25.5,12 25,12 C24.5,12 24,11.5 24,11 L24,3 C24,2.5 24.5,1.9999995 24.999998,1.9999995 z M28,1 C28.5,1 29,1.5 29,2 L29,11 C29,11.5 28.5,11.999996 28,12 C27.5,11.999996 27,11.5 27,11 L27,2 C27,1.5 27.5,1 28,1 z M31,0 C31.5,0 32,0.5 32,1 L32,11 C32,11.5 31.5,12 31,12 C30.5,12 30,11.5 30,11 L30,1 C30,0.5 30.5,0 31,0 z" Fill="{TemplateBinding Foreground}" Stretch="None" />
	            <Path Grid.Column="1" Height="12" Width="32" Data="M1,10 C1.5,10 2,10.5 2,11 C2,11.5 1.5,12 1,12 C0.5,12 0,11.5 0,11 C0,10.5 0.5,10 1,10 z M4,9 C4.5,9 5,9.5 5,10 L5,11 C5,11.5 4.5,12 4,12 C3.5,12 3,11.5 3,11 L3,10 C3,9.5 3.5,9 4,9 z M7,8 C7.5,8 8,8.5 8,9 L8,11 C8,11.5 7.5,12 7,12 C6.5,12 6,11.5 6,11 L6,9 C6,8.5 6.5,8 7,8 z M10,7 C10.5,7 11,7.5 11,8 L11,11 C11,11.5 10.5,12 10,12 C9.5,12 9,11.5 9,11 L9,8 C9,7.5 9.5,7 10,7 z M13,6 C13.5,6 14,6.5 14,7 L14,11 C14,11.5 13.5,12 13,12 C12.5,12 12,11.5 12,11 L12,7 C12,6.5 12.5,6 13,6 z M16,5 C16.5,5 17,5.5 17,6 L17,11 C17,11.5 16.5,12 16,12 C15.5,12 15,11.5 15,11 L15,6 C15,5.5 15.5,5 16,5 z M19,4 C19.5,4 20,4.5 20,5 L20,11 C20,11.5 19.5,12 19,12 C18.5,12 18,11.5 18,11 L18,5 C18,4.5 18.5,4 19,4 z M22,3 C22.5,3 23,3.5 23,4 L23,11 C23,11.5 22.5,12 22,12 C21.5,12 21,11.5 21,11 L21,4 C21,3.5 21.5,3 22,3 z M25,2 C25.5,2 26,2.5 26,3 L26,11 C26,11.5 25.5,12 25,12 C24.5,12 24,11.5 24,11 L24,3 C24,2.5 24.5,1.9999995 24.999998,1.9999995 z M28,1 C28.5,1 29,1.5 29,2 L29,11 C29,11.5 28.5,11.999996 28,12 C27.5,11.999996 27,11.5 27,11 L27,2 C27,1.5 27.5,1 28,1 z M31,0 C31.5,0 32,0.5 32,1 L32,11 C32,11.5 31.5,12 31,12 C30.5,12 30,11.5 30,11 L30,1 C30,0.5 30.5,0 31,0 z" Stretch="None" HorizontalAlignment="Right" />
	        </Grid>
			<Border x:Name="DisabledVisualElement" Margin="8,0,0,0" CornerRadius="0 2 2 0" Background="{StaticResource DisabledBrush}" Visibility="Collapsed" />	
		</Grid>
    </ControlTemplate>

    <!--******************** Control Panel ********************-->

    <ControlTemplate x:Key="ControlPanelTemplate" TargetType="Control">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <c1:C1BrushBuilder x:Name="VolumeBackgroundBrush" Input="{Binding ButtonBackground}" DesignBrush="{StaticResource MplayerVolumeControlBrush}" DesignColor="{StaticResource BaseColor}" />
            <c1:C1BrushBuilder x:Name="OuterBorderBrush" Input="{Binding ButtonBackground}" DesignBrush="{StaticResource InnerBorderBrush}" DesignColor="{StaticResource BaseColor}" />
            <Grid Grid.ColumnSpan="3">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock x:Name="VideoName" Visibility="{Binding IsTitleVisible, Converter={StaticResource ToVisibilityConverter}}" Text="{Binding ItemsView.CurrentItem.Title}" TextTrimming="WordEllipsis" Foreground="{Binding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Left" MaxWidth="160" />
                <c1_mediaPlayer:C1MoveToPointSlider Grid.Column="1" MinWidth="50" Template="{StaticResource MplayerTimelineSliderTemplate}" Minimum="0" Maximum="{Binding NaturalDuration, Converter={StaticResource TimeSpanConverter}}" Value="{Binding Position, Converter={StaticResource TimeSpanConverter}, Mode=TwoWay}" Visibility="{Binding IsPositionSliderVisible, Converter={StaticResource ToVisibilityConverter}}" Background="{Binding Background}" BorderBrush="{Binding BorderBrush}" />
                <StackPanel x:Name="timebkh" Orientation="Horizontal" Grid.Column="2" Margin="4 0 0 0" Visibility="{Binding IsTimePresenterVisible, Converter={StaticResource ToVisibilityConverter}}" VerticalAlignment="Center">
                    <TextBlock Text="{Binding Position, Converter={StaticResource HoursMinutesSecondsConverter}}" Foreground="{Binding Foreground}" />
                    <TextBlock Text="/" Foreground="{Binding Foreground}" />
                    <TextBlock Text="{Binding NaturalDuration, Converter={StaticResource HoursMinutesSecondsConverter}}" Foreground="{Binding Foreground}" />
                </StackPanel>
            </Grid>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="2">
                <ToggleButton x:Name="ShowMediaItems" Margin="0 0 2 0" Visibility="{Binding IsItemListButtonVisible, Converter={StaticResource ToVisibilityConverter}}" ToolTipService.ToolTip="{Binding Source={StaticResource MediaPlayerResources}, Path=ItemListToolTip}" IsChecked="{Binding IsItemListVisible, Mode=TwoWay}" Style="{Binding ToolBarButtonBaseStyle}" Background="{Binding ButtonBackground}" BorderBrush="{Binding BorderBrush}" c1:ClearStyleExtensions.MouseOverBrush="{Binding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{Binding PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{Binding FocusBrush}">
                    <Grid Height="12" Width="12">
                        <Path x:Name="icoslist" Data="M1.090909,8.000001 L10.909091,8.000001 C11.511544,8.000001 12,8.2944736 12,8.6578274 L12,9.3421745 C12,9.705472 11.511571,10.000001 10.909091,10.000001 L1.090909,10.000001 C0.48843327,10.000001 0,9.7054796 0,9.3421745 L0,8.6578274 C0,8.294466 0.48845896,8.000001 1.090909,8.000001 z M1.090909,3.9999998 L10.909091,3.9999998 C11.511584,3.9999998 12,4.2945118 12,4.6578255 L12,5.3421731 C12,5.7054753 11.511556,6.0000005 10.909091,5.9999995 L1.090909,5.9999995 C0.48844758,6.0000005 0,5.705483 0,5.3421731 L0,4.6578255 C0,4.2945037 0.48841923,3.9999998 1.090909,3.9999998 z M1.0909091,0 L10.909091,0 C11.511601,2.5327545E-06 12,0.29452261 12,0.65782607 L12,1.3421733 C12,1.7054882 11.511565,2 10.909091,1.9999999 L1.0909091,1.9999999 C0.48844954,2 -1.9123277E-06,1.7054927 1.7881393E-07,1.3421733 L1.7881393E-07,0.65782607 C-1.9123277E-06,0.29451817 0.48841357,2.5327545E-06 1.0909091,0 z" Fill="{Binding ButtonForeground}" Margin="0,1" Stretch="Fill" StrokeThickness="1" />
                    </Grid>
                </ToggleButton>
                <ToggleButton x:Name="ShowChapters" Margin="2 0" IsEnabled="{Binding ItemsView.CurrentItem.Chapters.Count}" Visibility="{Binding IsChapterListButtonVisible, Converter={StaticResource ToVisibilityConverter}}" ToolTipService.ToolTip="{Binding Source={StaticResource MediaPlayerResources}, Path=ChapterListToolTip}" IsChecked="{Binding IsChapterListVisible, Mode=TwoWay}" Style="{Binding ToolBarButtonBaseStyle}" Background="{Binding ButtonBackground}" BorderBrush="{Binding BorderBrush}" c1:ClearStyleExtensions.MouseOverBrush="{Binding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{Binding PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{Binding FocusBrush}">
                    <Grid Margin="-1 0" VerticalAlignment="Center" Width="14" Height="12">
                        <Path x:Name="icochapters" Data="M11,9 L12,9 L12,11 L11,11 z M0,9 L1.0000001,9 L1.0000001,11 L0,11 z M11,5.9999995 L12,5.9999995 L12,7.9999995 L11,7.9999995 z M0,5.9999995 L1.0000001,5.9999995 L1.0000001,7.9999995 L0,7.9999995 z M2.0000012,5.9999995 L10.000002,5.9999995 L10.000002,10.999999 L2.0000012,10.999999 z M11,3 L12,3 L12,5 L11,5 z M0,3 L1.0000001,3 L1.0000001,5 L0,5 z M11,0 L12,0 L12,1.9999999 L11,1.9999999 z M2.0000007,0 L10.000001,0 L10.000001,4.9999995 L2.0000007,4.9999995 z M0,0 L1.0000001,0 L1.0000001,1.9999999 L0,1.9999999 z" Fill="{Binding ButtonForeground}" StrokeThickness="0" Margin="1 1 1 0" Width="12" Height="11" />
                    </Grid>
                </ToggleButton>
                <c1_mediaPlayer:TemplateControl DataTemplate="{Binding ToolBarExtension}" />
            </StackPanel>
            <ToggleButton x:Name="fullscreen" Grid.Column="2" Grid.Row="2" Margin="2 0 0 0" HorizontalAlignment="Right" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Source={StaticResource MediaPlayerResources}, Path=FullScreenToolTip}" IsChecked="{Binding IsFullScreen, Mode=TwoWay}" Visibility="{Binding IsFullScreenButtonVisible, Converter={StaticResource ToVisibilityConverter}}" Style="{Binding ToolBarButtonBaseStyle}" Background="{Binding ButtonBackground}" BorderBrush="{Binding BorderBrush}" c1:ClearStyleExtensions.MouseOverBrush="{Binding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{Binding PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{Binding FocusBrush}">
                <Grid Height="12" Width="12">
                    <Path x:Name="icofull" Data="M9,5.5254836 L10,5.5254836 L10,7.000001 L10,8.000001 L9,8.0000019 L7.0000005,8.000001 L7.0000005,7.000001 L9,7.000001 z M1.9999981,5.5254836 L2.9999981,5.5254836 L2.9999981,7.000001 L4.9999981,7.000001 L4.9999981,8.000001 L2.9999981,8.000001 L1.9999981,8.0000019 z M7.0000005,1.9999986 L9,1.9999986 L10,1.9999986 L10,4.5254807 L9,4.5254807 L9,2.9999986 L7.0000005,2.9999986 z M1.9999981,1.9999986 L4.9999981,1.9999986 L4.9999981,2.9999986 L2.9999981,2.9999986 L2.9999981,4.5254807 L1.9999981,4.5254807 L1.9999981,2.9999986 z M0.99999815,0.99999869 L0.99999815,8.999999 L10.999998,8.999999 L10.999998,0.99999869 z M0.99999994,0 L11,0 C11.138059,6.5804762E-10 11.269604,0.027980383 11.389245,0.078584969 C11.449061,0.10388532 11.505909,0.13484225 11.55911,0.17078429 C11.585709,0.1887549 11.611398,0.20797198 11.636093,0.22835129 C11.833672,0.39140722 11.967525,0.62882876 11.994837,0.89775574 C11.998251,0.93137288 12,0.96548218 12,0.99999994 L12,8.999999 C12,9.1380825 11.972,9.2696362 11.921415,9.3892441 C11.896111,9.4490671 11.865158,9.5059137 11.829216,9.5591087 C11.811246,9.5857077 11.792029,9.6113968 11.771648,9.6360922 C11.608603,9.8336697 11.371201,9.9675236 11.102244,9.9948359 C11.068627,9.99825 11.034515,9.999999 11,9.999999 L7.000001,9.999999 L7.000001,11 L8.9999981,11 L8.9999981,12 L7.000001,12 L5.000001,12 L2.9999979,12 L2.9999979,11 L5.000001,11 L5.000001,9.999999 L0.99999994,9.999999 C0.86192364,9.999999 0.73038334,9.9720049 0.61075491,9.9214144 C0.55093247,9.8961105 0.49408808,9.8651552 0.44089043,9.829215 C0.4142898,9.811244 0.38860077,9.7920275 0.3639071,9.7716475 C0.16634187,9.6086092 0.032475326,9.3712034 0.0051628947,9.1022434 C0.0017486045,9.0686245 -1.7854269E-07,9.0345163 1.3672737E-11,8.999999 L1.3672737E-11,0.99999994 C-7.142304E-07,0.86192942 0.027981915,0.73039097 0.078584969,0.61075491 C0.10388625,0.55093467 0.13484338,0.4940896 0.17078429,0.44089043 C0.18875463,0.41429064 0.20797169,0.38860151 0.22835129,0.3639071 C0.39137706,0.16636579 0.62878597,0.032477923 0.89775592,0.0051628947 C0.93137258,0.0017488969 0.96548206,1.6451436E-10 0.99999994,0 z" Stretch="None" Height="12" Width="12" Fill="{Binding ButtonForeground}" StrokeThickness="0" HorizontalAlignment="Left" VerticalAlignment="Top" />
                </Grid>
            </ToggleButton>
            <Grid Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                    <ToggleButton x:Name="loop" Margin="2 0" IsChecked="{Binding IsLooping, Mode=TwoWay}" Visibility="{Binding IsLoopButtonVisible, Converter={StaticResource ToVisibilityConverter}}" ToolTipService.ToolTip="{Binding Source={StaticResource MediaPlayerResources}, Path=LoopToolTip}" Style="{Binding ToolBarButtonBaseStyle}" Background="{Binding ButtonBackground}" BorderBrush="{Binding BorderBrush}" c1:ClearStyleExtensions.MouseOverBrush="{Binding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{Binding PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{Binding FocusBrush}">
                        <Grid>
                            <Path x:Name="icoloop" Data="M5.7980666,0.50040472 C7.2369275,0.51792997 8.608552,1.1038491 9.6156015,2.10655 C10.119141,2.6079342 10.531555,3.2135477 10.815609,3.9043536 C11.099724,4.595314 11.240656,5.3495154 11.231898,6.0689325 C11.214381,7.5078545 10.628421,8.8793573 9.6256714,9.8863497 C9.1242838,10.389828 8.5187016,10.802171 7.8278656,11.086229 C7.1369276,11.370326 6.3828034,11.51125 5.6633811,11.502508 C4.2244573,11.485021 2.8529623,10.899153 1.8459519,9.8963699 C1.342458,9.3950043 0.9300977,8.7894173 0.64601439,8.098505 C0.61050564,8.012146 0.57700121,7.9244523 0.54557389,7.835464 C0.52986032,7.7909698 0.51466596,7.7461519 0.5,7.701015 L2.402113,7.0829802 L2.4311161,7.1685429 C2.5111189,7.3950753 2.6122711,7.6084113 2.7316182,7.807045 C2.7614546,7.8567033 2.7924275,7.9054422 2.8244913,7.953239 C2.9527459,8.1444244 3.0984497,8.320529 3.258652,8.4800529 C3.2987044,8.5199356 3.3396633,8.5587826 3.3814821,8.5965691 C3.4023914,8.6154623 3.4235156,8.6340904 3.444849,8.6524506 C4.1274676,9.2399492 5.0243988,9.5531826 5.9464307,9.4956207 C6.1769314,9.4812384 6.408989,9.443676 6.6396685,9.3814449 C7.1010089,9.2569771 7.5318799,9.0381575 7.8912549,8.7562609 C8.6099806,8.192502 9.0783701,7.3672953 9.2001629,6.4696703 C9.2610588,6.020864 9.2352896,5.5539222 9.1108341,5.0925617 C8.9863472,4.6311774 8.7675228,4.2003274 8.485652,3.8409777 C7.9219418,3.1223214 7.0966649,2.6538661 6.1990485,2.5320663 C5.7502432,2.4711709 5.2833176,2.4969263 4.8219509,2.6213984 C4.5912724,2.6836314 4.3682117,2.7694604 4.1579032,2.8749654 C4.0527496,2.927717 3.9507833,2.985388 3.8526459,3.0474877 L3.8067379,3.0773461 C4.4387264,3.5905769 5.6919942,4.4113612 5.7027035,4.6170382 C5.7134128,4.8227153 2.3613369,5.3119459 0.69065374,5.6594 C0.77693313,3.7519233 0.78048503,-0.029076511 0.94949198,-0.063030347 C1.1184989,-0.096984185 1.8986372,1.0748688 2.3732097,1.6438184 L2.4428487,1.5905679 C3.019685,1.1606628 3.7126191,0.83138639 4.438591,0.65511167 C4.801517,0.56698799 5.1660633,0.51734453 5.5275764,0.50381649 C5.6179547,0.50043434 5.7081423,0.49930945 5.7980666,0.50040472 z" Stretch="None" Fill="{Binding ButtonForeground}" Width="11" Height="12" />
                        </Grid>
                    </ToggleButton>
                    <Button x:Name="Stop" Margin="2 0" Command="c1_mediaPlayer:C1MediaPlayer.StopCommand" CommandTarget="{Binding .}" Visibility="{Binding IsStopButtonVisible, Converter={StaticResource ToVisibilityConverter}}" ToolTipService.ToolTip="{Binding Source={StaticResource MediaPlayerResources}, Path=StopToolTip}" Style="{StaticResource MplayerCommonButtonBase}" Background="{Binding ButtonBackground}" BorderBrush="{Binding BorderBrush}" c1:ClearStyleExtensions.MouseOverBrush="{Binding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{Binding PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{Binding FocusBrush}">
                        <Path x:Name="icostop" Stretch="Fill" Data="M0.5,1.5 C0.5,0.94771522 0.94771522,0.5 1.5,0.5 L10.5,0.5 C11.052285,0.5 11.5,0.94771522 11.5,1.5 L11.5,10.5 C11.5,11.052285 11.052285,11.5 10.5,11.5 L1.5,11.5 C0.94771522,11.5 0.5,11.052285 0.5,10.5 z" Fill="{Binding ButtonForeground}" Width="10" Height="10" StrokeThickness="0" />
                    </Button>
                    <Button x:Name="Previous" Margin="2 0" Command="c1_mediaPlayer:C1MediaPlayer.PreviousCommand" CommandTarget="{Binding .}" Visibility="{Binding IsPreviousButtonVisible, Converter={StaticResource ToVisibilityConverter}}" ToolTipService.ToolTip="{Binding Source={StaticResource MediaPlayerResources}, Path=PreviousToolTip}" Style="{StaticResource MplayerCommonButtonBase}" Background="{Binding ButtonBackground}" BorderBrush="{Binding BorderBrush}" c1:ClearStyleExtensions.MouseOverBrush="{Binding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{Binding PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{Binding FocusBrush}">
                        <Grid Height="12" Width="12">
                            <Path Data="M11.087973,2.7000904E-05 C11.13401,-0.00032877256 11.179344,0.0028578865 11.22371,0.0094664097 C11.312436,0.022682173 11.39729,0.049587231 11.476155,0.08923173 C11.791583,0.24779578 12.011191,0.61017185 11.999559,1.1155958 L11.999559,10.727486 C11.994704,11.911277 11.008502,12.281917 10.412028,11.78566 L4.9999442,7.4966869 C4.4453521,7.0406451 3.9999998,6.6723814 3.9999998,6.0111222 L3.9999998,6.0005884 C3.9999998,5.3393216 4.4297237,4.9968367 4.9999442,4.5027494 L10.37759,0.28576005 C10.424066,0.24702798 10.471159,0.21242937 10.518605,0.18184771 C10.708384,0.059521742 10.903813,0.0014450616 11.087973,2.7000904E-05 z M1,0 C1.0690389,1.040372E-06 1.1364443,0.0088379597 1.2015431,0.025663912 C1.461937,0.092971802 1.6854668,0.28812999 1.8292234,0.5569216 C1.9011016,0.69132203 1.9530468,0.84413707 1.9796844,1.0085918 C1.9930062,1.0908197 2,1.1759574 2,1.2631583 L2,10.736843 C2,10.911263 1.9720192,11.077395 1.9214172,11.228516 C1.8202112,11.530762 1.6285281,11.772892 1.3892517,11.900733 C1.2696161,11.964652 1.1380813,12 1,12 C0.93096256,12 0.86355805,11.991165 0.79845691,11.974337 C0.53805852,11.907028 0.31454158,11.711886 0.17077756,11.443076 C0.098894835,11.308675 0.046957731,11.155857 0.020314932,10.991407 C0.0069954395,10.909179 0,10.824038 0,10.736843 L0,1.2631583 C0,1.0887587 0.02798152,0.92261022 0.078579903,0.77148885 C0.17978024,0.46924105 0.37147498,0.22710593 0.61073875,0.099268198 C0.73038244,0.035346638 0.86192155,1.040372E-06 1,0 z" Fill="{Binding ButtonForeground}" HorizontalAlignment="Right" Stretch="Fill" SnapsToDevicePixels="False" Width="12" />
                        </Grid>
                    </Button>
                </StackPanel>
                <StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Left">
                    <Button x:Name="Next" Margin="2 0" ToolTipService.ToolTip="{Binding Source={StaticResource MediaPlayerResources}, Path=NextToolTip}" Visibility="{Binding IsNextButtonVisible, Converter={StaticResource ToVisibilityConverter}}" Command="c1_mediaPlayer:C1MediaPlayer.NextCommand" CommandTarget="{Binding .}" Style="{StaticResource MplayerCommonButtonBase}" Background="{Binding ButtonBackground}" BorderBrush="{Binding BorderBrush}" c1:ClearStyleExtensions.MouseOverBrush="{Binding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{Binding PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{Binding FocusBrush}">
                        <Grid Height="12" Width="12">
                            <Path x:Name="iconext2" Data="M0.91202831,2.670203E-05 C1.0961876,0.0014452527 1.2916174,0.059521347 1.4813957,0.18184775 C1.528842,0.21242975 1.5759354,0.24702777 1.6224108,0.28576028 L7.0000567,4.5027494 C7.5702763,4.9968371 8,5.3393226 8,6.0005903 L8,6.0111222 C8,6.6723824 7.5546484,7.0406451 7.0000567,7.4966869 L1.5879726,11.78566 C0.99149895,12.281916 0.0052957535,11.911278 0.00044059753,10.727486 L0.00044059753,1.1155957 C-0.011190414,0.61017203 0.20841694,0.24779582 0.52384567,0.089231253 C0.60271072,0.049586903 0.68756485,0.022681845 0.77629089,0.0094664684 C0.82065678,0.0028576874 0.86599064,-0.00032825631 0.91202831,2.670203E-05 z M10.999999,2.3756796E-07 C11.069037,1.1203086E-06 11.136443,0.0088387551 11.201543,0.025664151 C11.461935,0.092972472 11.685465,0.28812987 11.829223,0.55692166 C11.9011,0.69132233 11.953045,0.84413773 11.979683,1.0085921 C11.993005,1.0908203 11.999999,1.1759577 11.999999,1.2631584 L11.999999,10.736843 C11.999999,10.911264 11.972018,11.077396 11.921416,11.228516 C11.82021,11.530763 11.628527,11.772891 11.389252,11.900732 C11.269615,11.964654 11.138081,12 10.999999,12 C10.930961,12 10.863557,11.991165 10.798456,11.974337 C10.538057,11.907027 10.314541,11.711888 10.170776,11.443077 C10.098894,11.308674 10.046957,11.155858 10.020314,10.991407 C10.006994,10.90918 9.999999,10.824038 9.999999,10.736843 L9.999999,1.2631584 C9.999999,1.0887587 10.027981,0.92260998 10.078579,0.7714898 C10.179779,0.46924108 10.371473,0.2271062 10.610739,0.099268973 C10.730381,0.035347175 10.861921,1.9005876E-06 10.999999,2.3756796E-07 z" Fill="{Binding ButtonForeground}" Stretch="Fill" />
                        </Grid>
                    </Button>
                    <Grid x:Name="VolumePanel" Margin="2 0" Height="22" Visibility="{Binding IsVolumeControlVisible, Converter={StaticResource ToVisibilityConverter}}">
                        <Border x:Name="OuterBorderElement" CornerRadius="{StaticResource MplayerButtonOuterCornerRadius}" BorderBrush="{Binding ElementName=OuterBorderBrush, Path=Output}" BorderThickness="{StaticResource InnerBorderThickness}">
                        	<Border x:Name="BackgroundElement" Background="{Binding ElementName=VolumeBackgroundBrush, Path=Output}" CornerRadius="{StaticResource MplayerVolumePanelCornerRadius}" BorderThickness="{StaticResource MplayerVolumePanelBorderThickness}" BorderBrush="{Binding BorderBrush}" />
									</Border>	
                         <Grid Margin="{StaticResource InnerBorderThickness}">									
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="22" />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <c1_mediaPlayer:C1MoveToPointSlider Grid.Column="1" Margin="-8,0,0,0" Minimum="0" Maximum="1" Template="{StaticResource MplayerVolumeSliderTemplate}" Value="{Binding Volume, Mode=TwoWay}" ToolTipService.ToolTip="{Binding Source={StaticResource MediaPlayerResources}, Path=VolumeToolTip}" Background="{Binding ButtonBackground}" Foreground="{Binding ButtonForeground}" />
                                    <CheckBox Content="Mute" ToolTipService.ToolTip="{Binding Source={StaticResource MediaPlayerResources}, Path=MuteToolTip}" IsChecked="{Binding IsMuted, Mode=TwoWay}" Style="{StaticResource MplayerSoundCheckBox}" Foreground="{Binding ButtonForeground}" />
                            </Grid>
                    </Grid>
                </StackPanel>
                <ToggleButton x:Name="Play" Content="IsPlaying" Grid.Column="1" Margin="2 0" Visibility="{Binding IsPlayButtonVisible, Converter={StaticResource ToVisibilityConverter}}" ToolTipService.ToolTip="{Binding Source={StaticResource MediaPlayerResources}, Path=PlayPauseToolTip}" IsChecked="{Binding IsPlaying, Mode=TwoWay}" Style="{StaticResource MplayerPlayButton}" Background="{Binding ButtonBackground}" BorderBrush="{Binding BorderBrush}" Foreground="{Binding ButtonForeground}" c1:ClearStyleExtensions.MouseOverBrush="{Binding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{Binding PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{Binding FocusBrush}" />
            </Grid>
        </Grid>
    </ControlTemplate>

    <!--******************** Play List ********************-->

    <!-- ScrollViewer @ MediaPlayer PlayList -->
    <Style x:Key="MplayerPlayListScrollViewer" TargetType="ScrollViewer">
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollViewer">
                    <Grid>
                        
                        
                        <ScrollBar x:Name="PART_VerticalScrollBar" Orientation="Vertical" IsTabStop="False" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{TemplateBinding VerticalOffset}" ViewportSize="{TemplateBinding ViewportHeight}" Style="{StaticResource MplayerScrollbar}" Width="Auto" />
                        <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="12" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ListBox @ MediaPlayer PlayList -->
    <Style x:Key="MplayerPlayList" TargetType="ListBox">
        <Setter Property="Padding" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBox">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Background="{Binding Background}" BorderBrush="{Binding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0.85" />
                        <ScrollViewer x:Name="ScrollViewer" Background="{Binding Background}" HorizontalScrollBarVisibility="Auto" Style="{StaticResource MplayerPlayListScrollViewer}">
                            <ItemsPresenter />

                        </ScrollViewer>
                        <Border x:Name="ValidationErrorElement" Visibility="Collapsed" BorderBrush="#FFDB000C" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource GeneralCornerRadius}">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
                            </ToolTipService.ToolTip>
                            <Grid Height="10" HorizontalAlignment="Right" Margin="0,-4,-4,0" VerticalAlignment="Top" Width="10" Background="Transparent">
                                <Path Fill="#FFDC000C" Margin="-1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" />
                                <Path Fill="#ffffff" Margin="-1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8" />
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ListBoxItem @ MediaPlayer PlayList-->
    <Style x:Key="MplayerPlayListItemStyle" TargetType="ListBoxItem">
        <Setter Property="Padding" Value="3" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid MinHeight="85">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource GeneralGradientBrush}" DesignColor="{StaticResource BaseColor}" />
                        <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{StaticResource MouseOverBrush}" DesignBrush="{StaticResource GeneralGradientOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                        <c1:C1BrushBuilder x:Name="SelectedBackground" Input="{StaticResource SelectedBackground}" DesignBrush="{StaticResource GeneralGradientSelectedBackground}" DesignColor="{StaticResource SelectedColor}" />
                        <Border x:Name="BackgroundElement" Background="{Binding ElementName=BackgroundBrush, Path=Output}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" />
                        <Border x:Name="MouseOverElement" Background="{Binding ElementName=MouseOverBrush, Path=Output}" BorderThickness="1" Visibility="Collapsed" />
                        <Border x:Name="SelectedElement" Background="{Binding ElementName=SelectedBackground, Path=Output}" BorderBrush="{StaticResource SelectedBackground}" BorderThickness="1" Visibility="Collapsed" />
                        <ContentPresenter x:Name="contentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        <Rectangle x:Name="Separator" VerticalAlignment="Bottom" Height="2" Fill="{StaticResource MplayerPlayListSeparatorBrush}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--******************** Chapters *******************-->

    <!-- ScrollViewer @ MediaPlayer Chapter View-->
    <Style x:Key="MplayerChapterScrollViewer" TargetType="ScrollViewer">
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollViewer">
                    <Grid>
                        
                        
                        <ScrollBar x:Name="PART_HorizontalScrollBar" IsTabStop="False" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{TemplateBinding HorizontalOffset}" ViewportSize="{TemplateBinding ViewportWidth}" Style="{StaticResource MplayerScrollbar}" />
                        <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="12 2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ListBox @ MediaPlayer Chapter View-->
    <Style x:Key="MplayerChapterList" TargetType="ListBox">
        <Setter Property="Padding" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBox">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Background="{Binding Background}" BorderBrush="{Binding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0.75" />
                        <ScrollViewer x:Name="ScrollViewer" Background="{Binding Background}" HorizontalScrollBarVisibility="Auto" Style="{StaticResource MplayerChapterScrollViewer}">
                            <ItemsPresenter />
                        </ScrollViewer>
                        <Border x:Name="ValidationErrorElement" Visibility="Collapsed" BorderBrush="#FFDB000C" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
                            </ToolTipService.ToolTip>
                            <Grid Height="10" HorizontalAlignment="Right" Margin="0,-4,-4,0" VerticalAlignment="Top" Width="10" Background="Transparent">
                                <Path Fill="#FFDC000C" Margin="-1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" />
                                <Path Fill="#ffffff" Margin="-1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8" />
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ListBoxItem @ MediaPlayer Chapter View-->
    <Style x:Key="MplayerChapterListItem" TargetType="ListBoxItem">
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid x:Name="grid">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value=".5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <c1:C1BrushBuilder x:Name="MouseOverBrush" Input="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" DesignBrush="{StaticResource GeneralGradientOverBrush}" DesignColor="{StaticResource MouseOverColor}" />
                        <Border x:Name="MouseOverElement" Background="{Binding ElementName=MouseOverBrush, Path=Output}" BorderThickness="1" Visibility="Collapsed" />
                        <Border x:Name="SelectedElement" BorderBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" Visibility="Collapsed" />
                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="0 0 2 0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Button @ MediaPlayer Chapter Button in Item Template-->
    <Style x:Key="MplayerChapterButton" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                        <Rectangle x:Name="DisabledVisualElement" Fill="{StaticResource DisabledBrush}" Opacity="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--***************** PlayList & ChapterView Content Template***************-->

    <ControlTemplate x:Key="ListsTemplate" TargetType="ContentControl">
        <Grid>
            <ListBox x:Name="PlayList" ItemsSource="{Binding Items}" Visibility="{Binding IsItemListVisible, Converter={StaticResource ToVisibilityConverter}}" ItemContainerStyle="{StaticResource MplayerPlayListItemStyle}" Style="{StaticResource MplayerPlayList}" Background="{Binding Background}" Foreground="{Binding Foreground}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Button Style="{StaticResource MplayerChapterButton}" Command="c1_mediaPlayer:C1MediaPlayer.MoveCurrentToCommand" CommandTarget="{Binding _InternalCommandTarget}" CommandParameter="{Binding}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch">
                            <Grid Margin="5">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Border Width="90" Margin="0 0 5 0" BorderBrush="{Binding BorderBrush}" BorderThickness="{StaticResource GeneralThickness}">
                                    <Image Source="{Binding ThumbnailSource, Converter={StaticResource FallbackConverter}, ConverterParameter=/C1.Silverlight.MediaPlayer;component/no-image.jpg}" />
                                </Border>
                                <StackPanel Grid.Column="1">
                                    <TextBlock TextTrimming="WordEllipsis" TextWrapping="Wrap" TextAlignment="Left" Text="{Binding Title}" FontWeight="Bold" Style="{StaticResource MplayerListTitleBlock}" />
                                    <TextBlock Text="{Binding NaturalDuration, Converter={StaticResource HoursMinutesSecondsConverter}}" VerticalAlignment="Top" TextAlignment="Left" Style="{StaticResource MplayerListTextBlock}" />
                                </StackPanel>
                            </Grid>
                        </Button>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>

            <ListBox x:Name="chapters" VerticalAlignment="Bottom" HorizontalAlignment="Left" ItemsSource="{Binding ItemsView.CurrentItem.Chapters}" ItemContainerStyle="{StaticResource MplayerChapterListItem}" Visibility="{Binding IsChapterListVisible, Converter={StaticResource ToVisibilityConverter}}" Style="{StaticResource MplayerChapterList}" Background="{Binding Background}">
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"></StackPanel>
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Button Style="{StaticResource MplayerChapterButton}" Command="c1_mediaPlayer:C1MediaPlayer.SeekCommand" CommandTarget="{Binding _InternalCommandTarget}" CommandParameter="{Binding Position}">
                            <Grid Width="180" Margin="0 2">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Border BorderBrush="{Binding BorderBrush}" BorderThickness="{StaticResource GeneralThickness}" Height="45" Margin="2 0">
                                    <Image Source="{Binding ThumbnailSource, Converter={StaticResource FallbackConverter}, ConverterParameter=/C1.Silverlight.MediaPlayer;component/no-image.jpg}" VerticalAlignment="Top" />
                                </Border>
                                <StackPanel Grid.Column="1" Margin="0 0 5 0">
                                    <TextBlock Text="{Binding Title}" TextWrapping="Wrap" VerticalAlignment="Top" TextTrimming="WordEllipsis" Style="{StaticResource MplayerListTextBlock}" />
                                    <TextBlock Text="{Binding Position, Converter={StaticResource HoursMinutesSecondsConverter}}" TextWrapping="Wrap" Style="{StaticResource MplayerListTextBlock}" />
                                </StackPanel>
                            </Grid>
                        </Button>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </ControlTemplate>

    <!--******************* Paused Video *******************-->

    <DataTemplate x:Key="PausedDefaultTemplate">
        <Grid>
            <Border Opacity="0.5" Background="{StaticResource DisabledBrush}" />
            <Button Background="{Binding Background}" Style="{StaticResource MplayerUnPlayButton}" Command="c1_mediaPlayer:C1MediaPlayer.PlayCommand" CommandTarget="{Binding .}">
                <Grid Width="33" Height="46">
                    <Path x:Name="icoplay" Data="M0.0018197002,4.2764587 C-0.094153106,0.40171275 3.625035,-1.2801937 6.6924434,1.095417 L28.875227,17.260572 C31.227543,19.154688 33,20.467588 33,23.002304 L33,23.042679 C33,25.577394 31.16309,26.989067 28.875227,28.737358 L6.5503855,45.178452 C4.0896387,47.080978 0.0218262,45.658978 0.0018197002,41.122108 z" Fill="{Binding Background}" StrokeThickness="3" Width="28" Height="40" Stretch="Fill" Margin="3,0,4,0" />
                    <Path x:Name="icoplayMask" Data="M2.6066747,6.7138162 C2.5258546,3.3434694 5.6578298,1.8805069 8.2409334,3.9468699 L26.921335,18.00771 C28.902248,19.655256 30.394857,20.797247 30.394857,23.002005 L30.394857,23.037123 C30.394857,25.241879 28.847971,26.469786 26.921335,27.99049 L8.1213045,42.291348 C6.0490785,43.946213 2.6235223,42.70932 2.6066747,38.763042 z" Fill="{StaticResource MplayerStatesButtonBrush}" Stroke="{StaticResource MplayerStatesIconBorderBrush}" StrokeThickness="3" Width="33" Height="46" />
                </Grid>
            </Button>
        </Grid>
    </DataTemplate>

    <!--******************* Unstarted Video *******************-->

    <DataTemplate x:Key="UnstartedDefaultTemplate">
        <Grid>
            <Border Opacity="0.5" Background="{StaticResource DisabledBrush}" />
            <Button Background="{Binding Background}" Style="{StaticResource MplayerUnPlayButton}" Command="c1_mediaPlayer:C1MediaPlayer.PlayCommand" CommandTarget="{Binding .}">
                <Grid Width="33" Height="46">
                    <Path x:Name="icoplay" Data="M0.0018197002,4.2764587 C-0.094153106,0.40171275 3.625035,-1.2801937 6.6924434,1.095417 L28.875227,17.260572 C31.227543,19.154688 33,20.467588 33,23.002304 L33,23.042679 C33,25.577394 31.16309,26.989067 28.875227,28.737358 L6.5503855,45.178452 C4.0896387,47.080978 0.0218262,45.658978 0.0018197002,41.122108 z" Fill="{Binding Background}" StrokeThickness="3" Width="28" Height="40" Stretch="Fill" Margin="3,0,4,0" />
                    <Path x:Name="icoplayMask" Data="M2.6066747,6.7138162 C2.5258546,3.3434694 5.6578298,1.8805069 8.2409334,3.9468699 L26.921335,18.00771 C28.902248,19.655256 30.394857,20.797247 30.394857,23.002005 L30.394857,23.037123 C30.394857,25.241879 28.847971,26.469786 26.921335,27.99049 L8.1213045,42.291348 C6.0490785,43.946213 2.6235223,42.70932 2.6066747,38.763042 z" Fill="{StaticResource MplayerStatesButtonBrush}" Stroke="{StaticResource MplayerStatesIconBorderBrush}" StrokeThickness="3" Width="33" Height="46" />
                </Grid>
            </Button>
        </Grid>
    </DataTemplate>

    <!--******************* Loading Video *******************-->

    <DataTemplate x:Key="BufferingDefaultTemplate">
        <Grid>
            <Grid.Triggers>
                <EventTrigger RoutedEvent="Grid.Loaded">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
                            <Storyboard x:Name="AnimaLoading" RepeatBehavior="Forever">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="glossy" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                    <LinearDoubleKeyFrame KeyTime="00:00:00" Value="0" />
                                    <LinearDoubleKeyFrame KeyTime="00:00:00.5" Value="360" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
            </Grid.Triggers>
            <Border Opacity="0.5" Background="{StaticResource DisabledBrush}" />
            <Ellipse x:Name="Background" Width="100" Height="100" Fill="{Binding Background}" Opacity="0.5" HorizontalAlignment="Center" VerticalAlignment="Center" />
            <Ellipse x:Name="BackgroundMask" Width="100" Height="100" Fill="{StaticResource MplayerStatesButtonBrush}" Stroke="{Binding Background}" StrokeThickness="3" Opacity="0.5" HorizontalAlignment="Center" VerticalAlignment="Center" />
            <Path x:Name="Mask" Height="55" Width="55" Data="M34,16.499996 C32.791901,16.499996 31.612366,16.62241 30.473139,16.855536 C29.903551,16.972088 29.344025,17.11632 28.796036,17.286762 C24.412209,18.650259 20.767416,21.691017 18.612156,25.658457 C17.534554,27.642168 16.829363,29.857542 16.590351,32.210724 C16.470875,33.387337 16.470875,34.612656 16.590351,35.789268 C16.70986,36.965897 16.94589,38.108025 17.286768,39.20396 C18.650234,43.587654 21.690973,47.232582 25.658463,49.38784 C27.642197,50.465462 29.857584,51.1707 32.210728,51.409645 C33.387341,51.529152 34.612659,51.529152 35.789272,51.409645 C36.965881,51.290169 38.108006,51.054115 39.203964,50.71323 C43.587616,49.349747 47.232609,46.308987 49.387844,42.341534 C50.46545,40.35783 51.170689,38.14257 51.409649,35.789268 C51.529156,34.612656 51.529156,33.387337 51.409649,32.210724 C51.290173,31.034119 51.054115,29.891977 50.713234,28.796032 C49.349674,24.412102 46.308823,20.7673 42.341537,18.612152 C40.357769,17.534496 38.142429,16.829325 35.789272,16.590347 C35.200966,16.530602 34.604053,16.499996 34,16.499996 z M34,0.5 C52.501423,0.5 67.5,15.498446 67.5,34 C67.5,52.501812 52.501812,67.5 34,67.5 C15.498446,67.5 0.5,52.501423 0.5,34 C0.5,15.498836 15.498836,0.5 34,0.5 z" Fill="{StaticResource MplayerStatesButtonBrush}" StrokeThickness="3" Stroke="{StaticResource MplayerStatesIconBorderBrush}" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill" />
            <Path x:Name="glossy" Height="55" Width="55" Data="M34,16.499996 C32.791901,16.499996 31.612366,16.62241 30.473139,16.855536 C29.903551,16.972088 29.344025,17.11632 28.796036,17.286762 C24.412209,18.650259 20.767416,21.691017 18.612156,25.658457 C17.534554,27.642168 16.829363,29.857542 16.590351,32.210724 C16.470875,33.387337 16.470875,34.612656 16.590351,35.789268 C16.70986,36.965897 16.94589,38.108025 17.286768,39.20396 C18.650234,43.587654 21.690973,47.232582 25.658463,49.38784 C27.642197,50.465462 29.857584,51.1707 32.210728,51.409645 C33.387341,51.529152 34.612659,51.529152 35.789272,51.409645 C36.965881,51.290169 38.108006,51.054115 39.203964,50.71323 C43.587616,49.349747 47.232609,46.308987 49.387844,42.341534 C50.46545,40.35783 51.170689,38.14257 51.409649,35.789268 C51.529156,34.612656 51.529156,33.387337 51.409649,32.210724 C51.290173,31.034119 51.054115,29.891977 50.713234,28.796032 C49.349674,24.412102 46.308823,20.7673 42.341537,18.612152 C40.357769,17.534496 38.142429,16.829325 35.789272,16.590347 C35.200966,16.530602 34.604053,16.499996 34,16.499996 z M34,0.5 C52.501423,0.5 67.5,15.498446 67.5,34 C67.5,52.501812 52.501812,67.5 34,67.5 C15.498446,67.5 0.5,52.501423 0.5,34 C0.5,15.498836 15.498836,0.5 34,0.5 z" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Stretch="Fill">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform />
                        <SkewTransform />
                        <RotateTransform />
                        <TranslateTransform />
                    </TransformGroup>
                </Path.RenderTransform>
                <Path.Fill>
                    <RadialGradientBrush RadiusX="0.256" RadiusY="0.256" Center="0.271,0.776" GradientOrigin="0.271,0.776">
                        <GradientStop Color="White" Offset="0" />
                        <GradientStop Color="Transparent" Offset="1" />
                    </RadialGradientBrush>
                </Path.Fill>
            </Path>
        </Grid>
    </DataTemplate>

    <!--****************** C1MediaPlayer *******************-->

    <Style TargetType="c1_mediaPlayer:C1MediaPlayer">
        <Setter Property="Foreground" Value="{StaticResource ForegroundBrushColor}" />
        
                
        <Setter Property="Background" Value="{StaticResource WpfMplayerBackgroundBrush}" />
        <Setter Property="ButtonBackground" Value="{StaticResource WpfInputBaseBrush}" />
        <Setter Property="ButtonForeground" Value="{StaticResource WpfMplayerButtonIconBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource WpfInputBorderBrush}" />
        <Setter Property="MouseOverBrush" Value="{StaticResource WpfInputMouseOverBrush}" />
        <Setter Property="PressedBrush" Value="{StaticResource WpfInputSelectedBackground}" />
        <Setter Property="FocusBrush" Value="{StaticResource WpfInputFocusBrush}" />
        <Setter Property="BorderThickness" Value="{StaticResource GeneralThickness}" />
        <Setter Property="Padding" Value="5 2" />
        <Setter Property="ToolBarButtonBaseStyle" Value="{StaticResource MplayerCommonButtonBase}" />
        <Setter Property="UnstartedTemplate" Value="{StaticResource UnstartedDefaultTemplate}" />
        <Setter Property="BufferingTemplate" Value="{StaticResource BufferingDefaultTemplate}" />
        <Setter Property="PausedTemplate" Value="{StaticResource PausedDefaultTemplate}" />
        <Setter Property="FontSize" Value="10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1_mediaPlayer:C1MediaPlayer">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="IdleStates">
                                <VisualState x:Name="Idle">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FullScreenControlPanel" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:1" />
                                        <DoubleAnimation Storyboard.TargetName="NormalControlPanel" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Interacting" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="MediaStates">
                                <VisualState x:Name="NoMedia" />
                                <VisualState x:Name="Buffering">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BufferingSuperimposedFullScreenElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BufferingNotSuperimposedFullScreenElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BufferingSuperimposedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BufferingNotSuperimposedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Paused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PausedSuperimposedFullScreenElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PausedNotSuperimposedFullScreenElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PausedSuperimposedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PausedNotSuperimposedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unstarted">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="UnstartedSuperimposedFullScreenElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="UnstartedNotSuperimposedFullScreenElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="UnstartedSuperimposedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="UnstartedNotSuperimposedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Playing" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <!--<c1:C1BrushBuilder x:Name="BackgroundBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource MplayerBackgroundBrush}" DesignColor="{StaticResource BaseColor}"/>-->
                        <c1:C1BrushBuilder x:Name="InnerBorderBrush" Input="{TemplateBinding Background}" DesignBrush="{StaticResource InnerBorderBrush}" DesignColor="{StaticResource BaseColor}" />

                        <ContentControl x:Name="FullScreenElement" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{Binding IsEnabled}" FontFamily="{Binding FontFamily}" FontSize="{Binding FontSize}" FontStretch="{Binding FontStretch}" FontStyle="{Binding FontStyle}" FontWeight="{Binding FontWeight}">
                            <ContentControl.Template>
                                <ControlTemplate TargetType="ContentControl">
                                    <ContentPresenter Content="{TemplateBinding Content}" />
                                </ControlTemplate>
                            </ContentControl.Template>
                            <Grid FlowDirection="{Binding FlowDirection}" Cursor="{Binding Cursor}" Background="{StaticResource MplayerVideoScreenBrush}" IsHitTestVisible="{Binding IsHitTestVisible}" Visibility="{Binding Visibility}">
                                <Grid Visibility="{Binding SuperimposeButtonsFullScreen, Converter={StaticResource InverseToVisibilityConverter}}">
                                    <Border CornerRadius="{StaticResource MplayerCornerRadius}" Background="{Binding Background}" BorderThickness="{Binding BorderThickness}" BorderBrush="{Binding BorderBrush}">
                                        <Border BorderBrush="{Binding Output, ElementName=InnerBorderBrush}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerInnerBorderCornerRadius}">
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition />
                                                    <RowDefinition Height="Auto" />
                                                </Grid.RowDefinitions>
                                                <Border Background="{StaticResource MplayerVideoScreenBrush}" BorderBrush="{Binding BorderBrush}" BorderThickness="{Binding BorderThickness}">
                                                    <Grid>
                                                        <c1:C1LayoutTransformer LayoutTransform="{Binding MediaTransform}">
                                                            <Rectangle Fill="{Binding VideoBrush}" />
                                                        </c1:C1LayoutTransformer>
                                                        <c1_mediaPlayer:TemplateControl x:Name="UnstartedNotSuperimposedFullScreenElement" Visibility="Collapsed" DataTemplate="{Binding UnstartedTemplate}" />
                                                        <c1_mediaPlayer:TemplateControl x:Name="BufferingNotSuperimposedFullScreenElement" Visibility="Collapsed" DataTemplate="{Binding BufferingTemplate}" />
                                                        <c1_mediaPlayer:TemplateControl x:Name="PausedNotSuperimposedFullScreenElement" Visibility="Collapsed" DataTemplate="{Binding PausedTemplate}" />
                                                        <ContentControl HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Content="{x:Null}" ContentTemplate="{Binding ScreenExtension}" />
                                                    </Grid>
                                                </Border>
                                                <ContentControl Template="{StaticResource ListsTemplate}" Background="{Binding Background}" Foreground="{Binding Foreground}" />
                                                <ContentControl Grid.Row="1" Template="{StaticResource ControlPanelTemplate}" Background="{TemplateBinding ButtonBackground}" Foreground="{Binding ButtonForeground}" c1:ClearStyleExtensions.MouseOverBrush="{Binding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{Binding PressedBrush}" c1:ClearStyleExtensions.FocusBrush="{Binding FocusBrush}" />
                                            </Grid>
                                        </Border>
                                    </Border>
                                </Grid>
                                <Grid Visibility="{Binding SuperimposeButtonsFullScreen, Converter={StaticResource ToVisibilityConverter}}">
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <c1:C1LayoutTransformer Grid.RowSpan="2" LayoutTransform="{Binding MediaTransform}">
                                        <Rectangle Fill="{Binding VideoBrush}" />
                                    </c1:C1LayoutTransformer>
                                    <Grid Margin="5" Grid.Row="1" x:Name="FullScreenControlPanel">
                                        <Border Background="{Binding Background}" BorderThickness="{Binding BorderThickness}" BorderBrush="{Binding BorderBrush}" CornerRadius="{StaticResource MplayerCornerRadius}" Opacity="0.9">
                                            <Border BorderBrush="{Binding Output, ElementName=InnerBorderBrush}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerInnerBorderCornerRadius}" />
                                        </Border>
                                        <ContentControl Template="{StaticResource ControlPanelTemplate}" Background="{Binding Background}" Foreground="{Binding Foreground}" FontSize="{TemplateBinding FontSize}" Margin="{Binding Padding}" />
                                    </Grid>
                                    <c1_mediaPlayer:TemplateControl x:Name="UnstartedSuperimposedFullScreenElement" Visibility="Collapsed" DataTemplate="{Binding UnstartedTemplate}" />
                                    <c1_mediaPlayer:TemplateControl x:Name="BufferingSuperimposedFullScreenElement" Visibility="Collapsed" DataTemplate="{Binding BufferingTemplate}" />
                                    <c1_mediaPlayer:TemplateControl x:Name="PausedSuperimposedFullScreenElement" Visibility="Collapsed" DataTemplate="{Binding PausedTemplate}" />
                                    <ContentControl HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Content="{x:Null}" ContentTemplate="{Binding ScreenExtension}" />
                                    <ContentControl Template="{StaticResource ListsTemplate}" Background="{Binding Background}" Foreground="{Binding Foreground}" />
                                </Grid>
                            </Grid>
                        </ContentControl>
                        <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                            <Grid Opacity="{Binding SuperimposeButtonsWindowed, Converter={StaticResource InverseToOpacityConverter}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Border Background="{StaticResource MplayerVideoScreenBrush}">
                                    <Grid>
                                        <c1:C1LayoutTransformer LayoutTransform="{Binding MediaTransform}">
                                            <Grid x:Name="MediaPanel" />
                                        </c1:C1LayoutTransformer>
                                        <c1_mediaPlayer:TemplateControl x:Name="UnstartedNotSuperimposedElement" Visibility="Collapsed" DataTemplate="{Binding UnstartedTemplate}" />
                                        <c1_mediaPlayer:TemplateControl x:Name="BufferingNotSuperimposedElement" Visibility="Collapsed" DataTemplate="{Binding BufferingTemplate}" />
                                        <c1_mediaPlayer:TemplateControl x:Name="PausedNotSuperimposedElement" Visibility="Collapsed" DataTemplate="{Binding PausedTemplate}" />
                                        <ContentControl Content="{x:Null}" ContentTemplate="{Binding ScreenExtension}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
                                    </Grid>
                                </Border>
                                <ContentControl Template="{StaticResource ListsTemplate}" Background="{Binding Background}" Foreground="{Binding Foreground}" />
                                <Grid Grid.Row="1" Margin="1">
                                    <Border Background="{Binding Background}" BorderThickness="{Binding BorderThickness}" BorderBrush="{Binding BorderBrush}" CornerRadius="{StaticResource MplayerCornerRadius}">
                                        <Border BorderBrush="{Binding Output, ElementName=InnerBorderBrush}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerInnerBorderCornerRadius}" />
                                    </Border>
                                    <ContentControl Template="{StaticResource ControlPanelTemplate}" Background="{Binding Background}" Foreground="{Binding Foreground}" FontSize="{TemplateBinding FontSize}" Margin="{Binding Padding}" />
                                </Grid>
                            </Grid>

                            <Grid Visibility="{Binding SuperimposeButtonsWindowed, Converter={StaticResource ToVisibilityConverter}}">
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <c1:C1LayoutTransformer Grid.RowSpan="2" LayoutTransform="{Binding MediaTransform}">
                                    <Rectangle Fill="{Binding VideoBrush}" />
                                </c1:C1LayoutTransformer>
                                <Grid Grid.Row="1" x:Name="NormalControlPanel">
                                    <Border Background="{Binding Background}" BorderThickness="{Binding BorderThickness}" BorderBrush="{Binding BorderBrush}" CornerRadius="{StaticResource MplayerCornerRadius}">
                                        <Border BorderBrush="{Binding Output, ElementName=InnerBorderBrush}" BorderThickness="{StaticResource InnerBorderThickness}" CornerRadius="{StaticResource MplayerInnerBorderCornerRadius}" />
                                    </Border>
                                    <ContentControl Template="{StaticResource ControlPanelTemplate}" Background="{Binding Background}" Foreground="{Binding Foreground}" FontSize="{TemplateBinding FontSize}" Margin="{Binding Padding}" />

                                </Grid>
                                <c1_mediaPlayer:TemplateControl x:Name="UnstartedSuperimposedElement" Visibility="Collapsed" DataTemplate="{Binding UnstartedTemplate}" />
                                <c1_mediaPlayer:TemplateControl x:Name="BufferingSuperimposedElement" Visibility="Collapsed" DataTemplate="{Binding BufferingTemplate}" />
                                <c1_mediaPlayer:TemplateControl x:Name="PausedSuperimposedElement" Visibility="Collapsed" DataTemplate="{Binding PausedTemplate}" />
                                <ContentControl Content="{x:Null}" ContentTemplate="{Binding ScreenExtension}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
                                <ContentControl Template="{StaticResource ListsTemplate}" Background="{Binding Background}" Foreground="{Binding Foreground}" />
                            </Grid>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
