<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="WPF_Media_Player.ucMediaPlayer"
Loaded="ucMediaPlayer_Loaded"
>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles.xaml"/>
<ResourceDictionary Source="Resources/Templates.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid x:Name ="grdMain" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" x:Name="col0" />
<ColumnDefinition Width="*" x:Name="col1" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" x:Name="row1" />
<RowDefinition Height="60" x:Name="row2" />
</Grid.RowDefinitions>
<ScrollViewer x:Name="svMediaItems" Grid.Row="0" Grid.Column="0" HorizontalScrollBarVisibility="Disabled" Width="150" Drop="Media_Drop" AllowDrop="True" BorderThickness="0,0,0,0" BorderBrush="Transparent" Margin="0,0,0,50">
<StackPanel Orientation="Vertical" Background="White" >
<Label Background="White" Foreground="Gray" FontFamily="Tahoma" FontSize="10" BorderBrush="Transparent" Content="Drag Media Items Here..."/>
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<Label x:Name="lblSave" MouseDown="lblSave_MouseDown" RenderTransformOrigin="0.5,0.5" Background="Transparent" Foreground="Gray" FontFamily="Wingdings" FontSize="14" BorderBrush="Transparent" Content="=" ToolTip="Save" Style="{DynamicResource PulseLabel}"/>
<Label x:Name="lblLoad" MouseDown="lblLoad_MouseDown" RenderTransformOrigin="0.5,0.5" Background="Transparent" Foreground="Gray" FontFamily="Wingdings" FontSize="14" BorderBrush="Transparent" Content="6" ToolTip="Load" Style="{DynamicResource PulseLabel}"/>
<Label x:Name="lblClear" MouseDown="lblClear_MouseDown" RenderTransformOrigin="0.5,0.5" Background="Transparent" Foreground="Gray" FontFamily="Wingdings" FontSize="14" BorderBrush="Transparent" Content="û" ToolTip="Clear" Style="{DynamicResource PulseLabel}"/>
<Label x:Name="lbl3D" MouseDown="lbl3D_MouseDown" RenderTransformOrigin="0.5,0.5" Background="Transparent" Foreground="Gray" FontFamily="Wingdings" FontSize="14" BorderBrush="Transparent" Content="r" ToolTip="Use 3D Style Media Items" Style="{DynamicResource PulseLabel}"/>
<Label x:Name="lblNormal" MouseDown="lblNormal_MouseDown" RenderTransformOrigin="0.5,0.5" Background="Transparent" Foreground="Gray" FontFamily="Wingdings" FontSize="14" BorderBrush="Transparent" Content="o" ToolTip="Use Flat Style Media Items" Style="{DynamicResource PulseLabel}"/>
</StackPanel>
<ListBox x:Name="lstMediaItems"
SelectionChanged="lstMediaItems_SelectionChanged"
BorderBrush="White"
Background="White" Width="150"
ScrollViewer.HorizontalScrollBarVisibility ="Disabled">
<ListBox.ItemTemplate>
<DataTemplate>
<Button x:Name="lstMediaItemBtn" VerticalAlignment="Center" Style="{DynamicResource ButtonStyle}" Click="btnMediaItems_Clicked">
<Button.ToolTip>
<StackPanel Orientation="Vertical">
<Label Background="Black" Margin="2,2,2,2" FontWeight="Bold" FontFamily="Arial" Foreground="White" Content="{Binding Path=ItemUri}"/>
<TextBlock Padding="10" TextWrapping="WrapWithOverFlow" Width="200">
You have rated this media item with a rating of
</TextBlock>
<Label Padding="10" FontFamily="Arial" FontSize="20" FontWeight="Bold" Content="{Binding Path=ItemRatingFull}"/>
</StackPanel>
</Button.ToolTip>
<MediaElement Name="lstMediaItem" Source="{Binding Path=ItemUri}" LoadedBehavior="Play" Volume="0" />
</Button>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
</StackPanel>
</ScrollViewer>
<Border x:Name="mediaPlayerBorder" Background="Gray" BorderBrush="Gray" Grid.Row="0" Grid.Column="1" BorderThickness="4,4,4,4" Margin="2,2,5,2" CornerRadius="5,5,5,5" ToolTip="Click here to collapse/expand the video">
<Button x:Name="btnMediaPlayerMain" Click="btnMediaPlayerMain_Click" Height="Auto" Width="Auto" Template="{StaticResource transparentButtonTemplate}">
<MediaElement x:Name="mediaPlayerMain" MediaOpened="mediaPlayerMain_MediaOpened" MediaEnded="mediaPlayerMain_MediaEnded" LoadedBehavior="Manual" Margin="0,0,0,0" Stretch="Fill"/>
</Button>
</Border>
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" CornerRadius="5,5,5,5" Background="WhiteSmoke" BorderBrush="Gray" BorderThickness="4,4,4,4" Margin="10,5,5,10">
<StackPanel Background="Transparent" Width="Auto" Margin="0,0,0,0" Orientation="Horizontal" Height="Auto">
<Button x:Name="btnPlay" Click="btnPlay_Click" Width="50" Height="50" Margin="10,-30,0,0" Template="{StaticResource controlButtonTemplate}" FontSize="14" FontWeight="Bold" Foreground="LightGreen" Content="4" FontFamily="Webdings" ToolTip="Play"></Button>
<Button x:Name="btnPause" Click="btnPause_Click" Width="40" Height="40" Margin="-15,-50,0,0" Template="{StaticResource controlButtonTemplate}" FontSize="14" FontWeight="Bold" Foreground="Orange" Content=";" FontFamily="Webdings" ToolTip="Pause"></Button>
<Button x:Name="btnStop" Click="btnStop_Click" Width="30" Height="30" Margin="-10,-45,0,0" Template="{StaticResource controlButtonTemplate}" FontSize="14" FontWeight="Bold" Foreground="Yellow" Content="<" FontFamily="Webdings" ToolTip="Stop"></Button>
<!-- Seek Control -->
<TextBlock Foreground="Gray" Margin="-10,5,5,5" VerticalAlignment="Center" FontSize="10">Seek To</TextBlock>
<Slider Name="sliderTime" Margin="2,0,0,0" VerticalAlignment="Center" ValueChanged="SeekToMediaPosition" Width="80" Height="Auto" />
<!-- Volume Control -->
<TextBlock Foreground="Gray" Margin="5,5,5,5" VerticalAlignment="Center" FontSize="10">Volume</TextBlock>
<Slider Name="sliderVolume" Margin="2,0,0,0" VerticalAlignment="Center" ValueChanged="ChangeMediaVolume" Width="80" Height="Auto" Minimum="0" Maximum="1" Value="0.5"/>
<StackPanel Orientation="Vertical" Margin="10,0,0,0">
<TextBlock x:Name="txtRating" Foreground="Gray" Margin="0,0,0,0" VerticalAlignment="Center" FontSize="10">Rating For Item</TextBlock>
<StackPanel x:Name="starStack" Orientation="Horizontal">
</StackPanel>
</StackPanel>
</StackPanel>
</Border>
</Grid>
</UserControl>