<UserControl xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"  x:Name="Main" x:Class="TrailerPlayer.MediaPlayer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:my="clr-namespace:TrailerPlayer"
    Width="350" Height="270" xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
	<UserControl.Resources>
        <Storyboard x:Name="controller_go">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Controller" Storyboard.TargetProperty="Opacity">
                <SplineDoubleKeyFrame KeyTime="00:00:0.5" Value="0">
                    <SplineDoubleKeyFrame.KeySpline>
                        <KeySpline ControlPoint1="1,0" ControlPoint2="1,1"/>
                    </SplineDoubleKeyFrame.KeySpline>
                </SplineDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="controller_in">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Controller" Storyboard.TargetProperty="Opacity">
                <SplineDoubleKeyFrame KeyTime="00:00:0.5" Value="1">
                    <SplineDoubleKeyFrame.KeySpline>
                        <KeySpline ControlPoint1="1,0" ControlPoint2="1,1"/>
                    </SplineDoubleKeyFrame.KeySpline>
                </SplineDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="thumb_go">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="Opacity">
                <SplineDoubleKeyFrame KeyTime="00:00:0.5" Value="0">
                    <SplineDoubleKeyFrame.KeySpline>
                        <KeySpline ControlPoint1="1,0" ControlPoint2="1,1"/>
                    </SplineDoubleKeyFrame.KeySpline>
                </SplineDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="thumb_in">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="Opacity">
                <SplineDoubleKeyFrame KeyTime="00:00:0.5" Value="1">
                    <SplineDoubleKeyFrame.KeySpline>
                        <KeySpline ControlPoint1="1,0" ControlPoint2="1,1"/>
                    </SplineDoubleKeyFrame.KeySpline>
                </SplineDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Style x:Key="PlayButtonStyle" TargetType="ToggleButton">
			<Setter Property="Background" Value="#FF1F3B53"/>
			<Setter Property="Foreground" Value="#FF000000"/>
			<Setter Property="Padding" Value="3"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFA3AEB9" Offset="0"/>
						<GradientStop Color="#FF8399A9" Offset="0.375"/>
						<GradientStop Color="#FF718597" Offset="0.375"/>
						<GradientStop Color="#FF617584" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ToggleButton">
						<Grid>
							<Grid.Resources>
								<Storyboard x:Name="Storyboard1">
									<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
										<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="12.5"/>
									</DoubleAnimationUsingKeyFrames>
								</Storyboard>
							</Grid.Resources>
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualState x:Name="Normal"/>
									<vsm:VisualState x:Name="MouseOver">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
												<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
									<vsm:VisualState x:Name="Pressed">
										<Storyboard>
											<ColorAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
												<SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
											</ColorAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
												<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
									<vsm:VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
												<SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
								<vsm:VisualStateGroup x:Name="CheckStates">
									<vsm:VisualStateGroup.Transitions>
										<vsm:VisualTransition From="Checked" GeneratedDuration="00:00:00" To="Unchecked"/>
										<vsm:VisualTransition From="Unchecked" GeneratedDuration="00:00:00" To="Checked"/>
									</vsm:VisualStateGroup.Transitions>
									<vsm:VisualState x:Name="Checked">
										<Storyboard>
											<PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(Path.Data).(PathGeometry.Figures)[0].(PathFigure.Segments)[0].(LineSegment.Point)">
												<SplinePointKeyFrame KeyTime="00:00:00.2000000" Value="3.71875,2.59375"/>
											</PointAnimationUsingKeyFrames>
											<PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(Path.Data).(PathGeometry.Figures)[0].(PathFigure.Segments)[1].(LineSegment.Point)">
												<SplinePointKeyFrame KeyTime="00:00:00.2000000" Value="3.65625,14.375"/>
											</PointAnimationUsingKeyFrames>
											<PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(Path.Data).(PathGeometry.Figures)[0].(PathFigure.StartPoint)">
												<SplinePointKeyFrame KeyTime="00:00:00.2000000" Value="1.625,2.5625"/>
											</PointAnimationUsingKeyFrames>
											<PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(Path.Data).(PathGeometry.Figures)[0].(PathFigure.Segments)[2].(LineSegment.Point)">
												<SplinePointKeyFrame KeyTime="00:00:00.2000000" Value="1.5,14.4375"/>
											</PointAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
												<SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="9.247"/>
											</DoubleAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
												<SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.699"/>
											</DoubleAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
												<SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.727"/>
											</DoubleAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
												<SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="6.542"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
									<vsm:VisualState x:Name="Unchecked">
										<Storyboard/>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
								<vsm:VisualStateGroup x:Name="FocusStates">
									<vsm:VisualState x:Name="Focused">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
												<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
									<vsm:VisualState x:Name="Unfocused"/>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							<Border x:Name="Background" Background="White" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
								<Grid Margin="1" Background="{TemplateBinding Background}">
									<Border x:Name="BackgroundAnimation" Opacity="0" Background="#FF448DCA" RenderTransformOrigin="0.5,0.5">
										<Border.RenderTransform>
											<TransformGroup>
												<ScaleTransform/>
												<SkewTransform/>
												<RotateTransform/>
												<TranslateTransform/>
											</TransformGroup>
										</Border.RenderTransform>
									</Border>
								</Grid>
							</Border>
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
							<Rectangle x:Name="DisabledVisualElement" IsHitTestVisible="false" Opacity="0" Fill="#FFFFFFFF" RadiusX="3" RadiusY="3"/>
							<Rectangle Margin="1" x:Name="FocusVisualElement" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
							<Path Margin="6.25,6.25,0,6.75" Stretch="None" Stroke="#FF000000" Data="M0.59989011,0.5 L2.8378003,0.5 L2.747885,12.490858 L0.5,12.500851 z" HorizontalAlignment="Left" x:Name="path1" Width="3.336" RenderTransformOrigin="0.5,0.5" d:LayoutOverrides="VerticalAlignment, Width" Fill="#FFFFFFFF">
								
								<Path.RenderTransform>
									<TransformGroup>
										<ScaleTransform/>
										<SkewTransform/>
										<RotateTransform/>
										<TranslateTransform/>
									</TransformGroup>
								</Path.RenderTransform>
							</Path>
							<Path Margin="4.708,3.875,3.292,4.125" x:Name="path" RenderTransformOrigin="0.5,0.5" Stretch="None" Stroke="#FF000000" Fill="#FFFFFFFF">
								<Path.RenderTransform>
									<TransformGroup>
										<ScaleTransform/>
										<SkewTransform/>
										<RotateTransform/>
										<TranslateTransform/>
									</TransformGroup>
								</Path.RenderTransform>
								<Path.Data>
									<PathGeometry>
										<PathFigure IsClosed="True" StartPoint="0.761301755905151,0.508554697036743">
											<LineSegment Point="16.3802642822266,8.58547592163086"/>
											<LineSegment Point="17.3428478240967,9.08325004577637"/>
											<LineSegment Point="0.657151579856873,17.4914455413818"/>
										</PathFigure>
									</PathGeometry>
								</Path.Data>
							</Path>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Name="Mike" x:Key="CustomSliderStyle" TargetType="my:CustomSlider">
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Maximum" Value="10"/>
			<Setter Property="Minimum" Value="0"/>
			<Setter Property="Value" Value="0"/>
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFA3AEB9" Offset="0"/>
						<GradientStop Color="#FF8399A9" Offset="0.375"/>
						<GradientStop Color="#FF718597" Offset="0.375"/>
						<GradientStop Color="#FF617584" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="IsTabStop" Value="False"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="my:CustomSlider">
						<Grid x:Name="Root">
							<Grid.Resources>
								<ControlTemplate x:Key="RepeatButtonTemplate">
									<Grid x:Name="Root" Opacity="0" Background="Transparent"/>
								</ControlTemplate>
							</Grid.Resources>
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualState x:Name="Normal"/>
									<vsm:VisualState x:Name="MouseOver"/>
									<vsm:VisualState x:Name="Disabled">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="HorizontalTrackRectangleDisabledOverlay" Storyboard.TargetProperty="Visibility">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ThumbDisabledOverlay" Storyboard.TargetProperty="Visibility">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="VerticalTrackRectangleDisabledOverlay" Storyboard.TargetProperty="Visibility">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							<Grid x:Name="HorizontalTemplate" Background="{TemplateBinding Background}">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="*"/>
								</Grid.ColumnDefinitions>
								<Rectangle Height="3" Margin="5,0,5,0" x:Name="TrackRectangle" Grid.Column="0" Grid.ColumnSpan="3" RadiusX="1" RadiusY="1" Fill="#FFE6EFF7" Stroke="#FFA3AEB9" StrokeThickness="{TemplateBinding BorderThickness}"/>
                                <Rectangle Height="3"  Width="0" Margin="5.333,11.667,4.667,11.333" x:Name="ProgressRectangle"  RadiusX="1" RadiusY="1" Fill="Red" Opacity="0.5" Stroke="#FFA3AEB9" StrokeThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" d:LayoutOverrides="Height" Grid.Column="1"/>
								<Rectangle Height="3" Margin="5,0,5,0" x:Name="HorizontalTrackRectangleDisabledOverlay" Opacity=".55" Visibility="Collapsed" Grid.Column="0" Grid.ColumnSpan="3" RadiusX="1" RadiusY="1" Fill="White"/>
								<RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="0"/>
								<Thumb Height="18" x:Name="HorizontalThumb" Width="11" IsTabStop="True" Grid.Column="1"/>
								<Rectangle x:Name="ThumbDisabledOverlay" Width="11" Opacity=".55" Visibility="Collapsed" Grid.Column="1" RadiusX="2" RadiusY="2" Fill="White"/>
								<RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="2"/>
								
							</Grid>
							<Grid x:Name="VerticalTemplate" Visibility="Collapsed" Background="{TemplateBinding Background}">
								<Grid.RowDefinitions>
									<RowDefinition Height="*"/>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="Auto"/>
								</Grid.RowDefinitions>
								<Rectangle Margin="0,5,0,5" Width="3" Grid.Row="0" Grid.RowSpan="3" RadiusX="1" RadiusY="1" Fill="#FFE6EFF7" Stroke="#FFA3AEB9" StrokeThickness="{TemplateBinding BorderThickness}"/>
								<Rectangle Margin="0,5,0,5" x:Name="VerticalTrackRectangleDisabledOverlay" Width="3" Opacity=".55" Visibility="Collapsed" Grid.Row="0" Grid.RowSpan="3" RadiusX="1" RadiusY="1" Fill="White"/>
								<RepeatButton x:Name="VerticalTrackLargeChangeDecreaseRepeatButton" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="2"/>
								<Thumb Height="11" x:Name="VerticalThumb" Width="18" IsTabStop="True" Grid.Row="1"/>
								<RepeatButton x:Name="VerticalTrackLargeChangeIncreaseRepeatButton" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="0"/>
							</Grid>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ProgressBarStyle1" TargetType="ProgressBar">
			<Setter Property="Foreground" Value="#FF027DB8"/>
			<Setter Property="Background" Value="#FFD2D5D8"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Maximum" Value="100"/>
			<Setter Property="IsTabStop" Value="False"/>
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
						<GradientStop Color="#FFAEB7BF" Offset="0"/>
						<GradientStop Color="#FF919EA7" Offset="0.35"/>
						<GradientStop Color="#FF7A8A99" Offset="0.35"/>
						<GradientStop Color="#FF647480" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ProgressBar">
						<Grid x:Name="Root">
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualState x:Name="Determinate"/>
									<vsm:VisualState x:Name="Indeterminate">
										<Storyboard RepeatBehavior="Forever">
											<ObjectAnimationUsingKeyFrames Duration="00:00:00" Storyboard.TargetName="IndeterminateRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
												<DiscreteObjectKeyFrame KeyTime="00:00:00">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Duration="00:00:00" Storyboard.TargetName="DeterminateRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
												<DiscreteObjectKeyFrame KeyTime="00:00:00">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateGradientFill" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X">
												<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
												<SplineDoubleKeyFrame KeyTime="00:00:.5" Value="20"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							<Border x:Name="ProgressBarTrack" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3"/>
							<Grid x:Name="ProgressBarRootGrid" Margin="0,0,0,0">
								<Rectangle Margin="{TemplateBinding BorderThickness}" x:Name="ProgressBarRootGradient" Canvas.ZIndex="1" RadiusX="1.5" RadiusY="1.5" Stroke="#FFFFFFFF" StrokeThickness="1" Fill="{x:Null}"/>
								<Grid x:Name="IndeterminateRoot" Visibility="Collapsed">
									<Rectangle Margin="{TemplateBinding BorderThickness}" x:Name="IndeterminateSolidFill" Opacity="1" RenderTransformOrigin="0.5,0.5" RadiusX="2" RadiusY="2" Fill="{TemplateBinding Foreground}" Stroke="#FF448DCA" StrokeThickness="0"/>
									<Rectangle Margin="{TemplateBinding BorderThickness}" x:Name="IndeterminateGradientFill" Opacity="0.7" RadiusX="2" RadiusY="2" StrokeThickness="1">
										<Rectangle.Fill>
											<LinearGradientBrush EndPoint="0,1" StartPoint="20,1" MappingMode="Absolute" SpreadMethod="Repeat">
												<LinearGradientBrush.Transform>
													<TransformGroup>
														<TranslateTransform X="0"/>
														<SkewTransform AngleX="-30"/>
													</TransformGroup>
												</LinearGradientBrush.Transform>
												<GradientStop Color="#FFFFFFFF" Offset="0"/>
												<GradientStop Color="#00FFFFFF" Offset=".25"/>
												<GradientStop Color="#FFFFFFFF" Offset="0.85"/>
											</LinearGradientBrush>
										</Rectangle.Fill>
									</Rectangle>
								</Grid>
								<Grid Margin="1" x:Name="DeterminateRoot">
									<Rectangle HorizontalAlignment="Left" Margin="{TemplateBinding BorderThickness}" x:Name="ProgressBarIndicator" RadiusX="1.5" RadiusY="1.5" Fill="{TemplateBinding Foreground}" StrokeThickness="0.5"/>
								</Grid>
							</Grid>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="DownloadProgressBarStyle" TargetType="ProgressBar">
			<Setter Property="Foreground" Value="#FF027DB8"/>
			<Setter Property="Background" Value="#FFD2D5D8"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Maximum" Value="100"/>
			<Setter Property="IsTabStop" Value="False"/>
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
						<GradientStop Color="#FFAEB7BF" Offset="0"/>
						<GradientStop Color="#FF919EA7" Offset="0.35"/>
						<GradientStop Color="#FF7A8A99" Offset="0.35"/>
						<GradientStop Color="#FF647480" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ProgressBar">
						<Grid x:Name="Root">
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualState x:Name="Determinate"/>
									<vsm:VisualState x:Name="Indeterminate">
										<Storyboard RepeatBehavior="Forever">
											<ObjectAnimationUsingKeyFrames Duration="00:00:00" Storyboard.TargetName="IndeterminateRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
												<DiscreteObjectKeyFrame KeyTime="00:00:00">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Duration="00:00:00" Storyboard.TargetName="DeterminateRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
												<DiscreteObjectKeyFrame KeyTime="00:00:00">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateGradientFill" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X">
												<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
												<SplineDoubleKeyFrame KeyTime="00:00:.5" Value="20"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							<Border x:Name="ProgressBarTrack" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3"/>
							<Grid x:Name="ProgressBarRootGrid">
								<Grid x:Name="IndeterminateRoot" Visibility="Collapsed">
									<Rectangle Margin="{TemplateBinding BorderThickness}" x:Name="IndeterminateSolidFill" Opacity="1" RenderTransformOrigin="0.5,0.5" RadiusX="2" RadiusY="2" Fill="{TemplateBinding Foreground}" Stroke="#FF448DCA" StrokeThickness="0"/>
									<Rectangle Margin="{TemplateBinding BorderThickness}" x:Name="IndeterminateGradientFill" Opacity="0.7" RadiusX="2" RadiusY="2" StrokeThickness="1">
										<Rectangle.Fill>
											<LinearGradientBrush EndPoint="0,1" StartPoint="20,1" MappingMode="Absolute" SpreadMethod="Repeat">
												<LinearGradientBrush.Transform>
													<TransformGroup>
														<TranslateTransform X="0"/>
														<SkewTransform AngleX="-30"/>
													</TransformGroup>
												</LinearGradientBrush.Transform>
												<GradientStop Color="#FFFFFFFF" Offset="0"/>
												<GradientStop Color="#00FFFFFF" Offset=".25"/>
												<GradientStop Color="#FFFFFFFF" Offset="0.85"/>
											</LinearGradientBrush>
										</Rectangle.Fill>
									</Rectangle>
								</Grid>
								<Grid Margin="1" x:Name="DeterminateRoot">
									<Rectangle HorizontalAlignment="Left" Margin="{TemplateBinding BorderThickness}" x:Name="ProgressBarIndicator" RadiusX="1.5" RadiusY="1.5" Fill="{TemplateBinding Foreground}" StrokeThickness="0.5"/>
								</Grid>
							</Grid>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		
	</UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="Black">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <MediaElement Margin="15,0" x:Name="Video"  AutoPlay="False" Grid.RowSpan="2"/>
        <Image Cursor="Hand" x:Name="Thumb" Grid.RowSpan="2"   RenderTransformOrigin="0.5,0.5"   >
        </Image>
        <Grid x:Name="Controller" Grid.Row="1" Margin="0,-5,0,0" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="40"/>
                <ColumnDefinition Width="40"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="15"/>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="40"/>
            </Grid.ColumnDefinitions>
            <ToggleButton Margin="0,0,0,5" x:Name="tbtnPlayPause" IsChecked="false" Grid.Column="0" Content="Play"/>
            <Button Margin="0,0,0,5" x:Name="btnBack" Grid.Column="1" Content="Stop"/>
            <ProgressBar x:Name="downloadProgress" Foreground="Red" Grid.Column="2" BorderBrush="Black" Background="Black" Height="10" Value="379" Margin="5" Style="{StaticResource DownloadProgressBarStyle}" ></ProgressBar>
            <TextBlock Text="Buffering" Foreground="White" FontSize="8" Grid.Column="2" Margin="2,28,0,0"/>
            <ProgressBar x:Name="bufferingProgress" Margin="40,28,5,0" BorderBrush="Black" Background="Black" Foreground="Green" Grid.Column="2" Height="5" BorderThickness="0" Value="100" Style="{StaticResource ProgressBarStyle1}"></ProgressBar>
            <my:CustomSlider  Margin="2" x:Name="slrSeeker" Grid.Column="2" Minimum="0" Maximum="100" Style="{StaticResource CustomSliderStyle}"/>
            <ToggleButton  x:Name="btnMute" Grid.Column="3" Height="15" IsChecked="False"/>
            <Slider Margin="2" x:Name="slrVolume" Grid.Column="4" Minimum="0.0" Maximum="1.0"/>
            <Button Margin="-5,0,5,5" x:Name="btnFullScreen" Grid.Column="5" Content="FULL"/>
        </Grid>
    </Grid>
</UserControl>
