<Window x:Class="ControlVideo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:ControlVideo"
        mc:Ignorable="d"
        Title="ControlVideo"
    Height="380" Width="525"
    Loaded="Window_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>

        <MediaElement x:Name="flutePlayer" Margin="5"
            Grid.Row="0" Grid.Column="0"
            MediaOpened="flutePlayer_MediaOpened"
            ScrubbingEnabled="True"
            LoadedBehavior="Manual" Source="flutes.mp4"/>

        <ScrollBar Orientation="Horizontal" Grid.Row="1" Name="positionScrollBar"
            VerticalAlignment="Center" Visibility="Hidden"/>

        <StackPanel Orientation="Horizontal" Grid.Row="2"
            HorizontalAlignment="Center" VerticalAlignment="Center">

            <StackPanel.Resources>
                <Style TargetType="Button">
                    <Setter Property="Margin" Value="2"/>
                </Style>
            </StackPanel.Resources>

            <Button x:Name="playButton" Click="playButton_Click">
                <Image Source="play.png"/>
            </Button>
            <Button x:Name="pauseButton" Click="pauseButton_Click" IsEnabled="False" Opacity="0.5">
                <Image Source="pause.png"/>
            </Button>
            <Button x:Name="stopButton" Click="stopButton_Click">
                <Image Source="stop.png"/>
            </Button>
            <Button x:Name="restartButton" Click="restartButton_Click">
                <Image Source="restart.png"/>
            </Button>
            <Button x:Name="nextButton" Click="nextButton_Click">
                <Image Source="next.png"/>
            </Button>
            <Button Name="previousButton" Click="previousButton_Click">
                <Image Source="previous.png"/>
            </Button>
            <Label Width="5"/>
            <Button x:Name="fasterButton" Click="fasterButton_Click">
                <Image Source="faster.png"/>
            </Button>
            <Button Name="slowerButton" Click="slowerButton_Click">
                <Image Source="slower.png"/>
            </Button>

            <Label Content="Position:" Margin="5,0,0,0" VerticalAlignment="Center"/>
            <TextBox Name="positionTextBox" Width="35" Height="24" Text="0.0"
                HorizontalContentAlignment="Right" VerticalContentAlignment="Center"/>
            <Button Margin="5,0,0,0" Content="Set Position" Height="30"
                Name="setPositionButton" Click="setPositionButton_Click"/>
        </StackPanel>
    </Grid>
</Window>
