<Window x:Class="WpfExample.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:WpfExample"
        mc:Ignorable="d"
        Title="Canon SDK Tutorial" Height="694" Width="645" MinWidth="645" MinHeight="694" Closing="Window_Closing">
    <Grid>
        <GroupBox x:Name="InitGroupBox" Header="Init" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="180" Width="171">
            <Grid>
                <Label x:Name="SessionLabel" Content="No open session" Margin="10,2,10,0" VerticalAlignment="Top"/>
                <ListBox x:Name="CameraListBox" Height="84" Margin="10,33,10,0" VerticalAlignment="Top"/>
                <Button x:Name="SessionButton" Content="Open Session" HorizontalAlignment="Left" Margin="10,122,0,0" VerticalAlignment="Top" Width="91" Height="26" Click="OpenSessionButton_Click"/>
                <Button x:Name="RefreshButton" Content="↻" HorizontalAlignment="Left" Margin="114,122,0,0" VerticalAlignment="Top" Width="35" FontSize="16" Height="26" Click="RefreshButton_Click"/>
            </Grid>
        </GroupBox>
        <GroupBox x:Name="SettingsGroupBox" Header="Settings" HorizontalAlignment="Left" Margin="186,10,0,0" VerticalAlignment="Top" Height="180" Width="439" Grid.ColumnSpan="2" IsEnabled="False">
            <Grid>
                <ComboBox x:Name="AvCoBox" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="100" SelectionChanged="AvCoBox_SelectionChanged"/>
                <ComboBox x:Name="TvCoBox" HorizontalAlignment="Left" Margin="10,37,0,0" VerticalAlignment="Top" Width="100" SelectionChanged="TvCoBox_SelectionChanged"/>
                <ComboBox x:Name="ISOCoBox" HorizontalAlignment="Left" Margin="10,64,0,0" VerticalAlignment="Top" Width="100" SelectionChanged="ISOCoBox_SelectionChanged"/>
                <ProgressBar x:Name="MainProgressBar" HorizontalAlignment="Left" Height="22" Margin="10,91,0,0" VerticalAlignment="Top" Width="137"/>
                <Label Content="Av" HorizontalAlignment="Left" Margin="118,7,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.447,0.538"/>
                <Label Content="Tv" HorizontalAlignment="Left" Margin="118,33,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.447,0.538"/>
                <Label Content="ISO" HorizontalAlignment="Left" Margin="118,60,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.447,0.538"/>
                <Button x:Name="TakePhotoButton" HorizontalAlignment="Left" Margin="162,64,0,0" VerticalAlignment="Top" Width="70" Height="49" FontWeight="Bold" FontSize="16" Click="TakePhotoButton_Click">
                    <TextBlock TextAlignment="Center">Take<LineBreak/>Photo</TextBlock>
                </Button>
                <Slider x:Name="BulbSlider" HorizontalAlignment="Left" Margin="162,37,0,0" VerticalAlignment="Top" Width="110" Minimum="1" Maximum="200" Value="30" LargeChange="10" TickFrequency="10" ToolTip="Bulb (in seconds)" ValueChanged="BulbSlider_ValueChanged"/>
                <TextBox x:Name="SavePathTextBox" HorizontalAlignment="Left" Height="23" Margin="10,125,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="297" IsEnabled="False"/>
                <TextBox x:Name="BulbBox" HorizontalAlignment="Left" Height="23" Margin="277,37,0,0" TextWrapping="Wrap" Text="30" VerticalAlignment="Top" Width="30" UndoLimit="0" ToolTip="Bulb (in seconds)" TextChanged="BulbBox_TextChanged"/>
                <Button x:Name="VideoButton" HorizontalAlignment="Left" Margin="237,64,0,0" VerticalAlignment="Top" Width="70" Height="49" FontWeight="Bold" FontSize="16" Click="VideoButton_Click">
                    <TextBlock x:Name="VideoButtonText" TextAlignment="Center">Record<LineBreak/>Video</TextBlock>
                </Button>
                <GroupBox Header="Save To" HorizontalAlignment="Left" Margin="312,7,0,0" VerticalAlignment="Top" Height="106" Width="105">
                    <Grid>
                        <RadioButton x:Name="STCameraRdButton" Content="Camera" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" GroupName="SaveToGroup" FontSize="14" IsChecked="True" Checked="SaveToRdButton_Checked"/>
                        <RadioButton x:Name="STComputerRdButton" Content="Computer" HorizontalAlignment="Left" Margin="10,34,0,0" VerticalAlignment="Top" GroupName="SaveToGroup" FontSize="14" Checked="SaveToRdButton_Checked"/>
                        <RadioButton x:Name="STBothRdButton" Content="Both" HorizontalAlignment="Left" Margin="10,58,0,0" VerticalAlignment="Top" GroupName="SaveToGroup" FontSize="14" Checked="SaveToRdButton_Checked"/>
                    </Grid>
                </GroupBox>
                <Button x:Name="BrowseButton" Content="Browse" HorizontalAlignment="Left" Margin="312,125,0,0" VerticalAlignment="Top" Width="105" Click="BrowseButton_Click" IsEnabled="False"/>
            </Grid>
        </GroupBox>
        <GroupBox x:Name="LiveViewGroupBox" Header="Live View" Margin="10,195,10,10" Grid.ColumnSpan="2" IsEnabled="False">
            <Grid>
                <Button x:Name="StarLVButton" Content="Start LV" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="75" Click="StarLVButton_Click"/>
                <Button x:Name="FocusNear3Button" Content="&lt;&lt;&lt;" HorizontalAlignment="Left" Margin="145,10,0,0" VerticalAlignment="Top" Width="35" Click="FocusNear3Button_Click"/>
                <Button x:Name="FocusNear2Button" Content="&lt;&lt;" HorizontalAlignment="Left" Margin="185,10,0,0" VerticalAlignment="Top" Width="25" Click="FocusNear2Button_Click"/>
                <Button x:Name="FocusNear1Button" Content="&lt;" HorizontalAlignment="Left" Margin="215,10,0,0" VerticalAlignment="Top" Width="20" Click="FocusNear1Button_Click"/>
                <Button x:Name="FocusFar3Button" Content="&gt;&gt;&gt;" HorizontalAlignment="Left" Margin="295,10,0,0" VerticalAlignment="Top" Width="35" Click="FocusFar3Button_Click"/>
                <Button x:Name="FocusFar2Button" Content="&gt;&gt;" HorizontalAlignment="Left" Margin="265,10,0,0" VerticalAlignment="Top" Width="25" Click="FocusFar2Button_Click"/>
                <Button x:Name="FocusFar1Button" Content="&gt;" HorizontalAlignment="Left" Margin="240,10,0,0" VerticalAlignment="Top" Width="20" Click="FocusFar1Button_Click"/>
                <Canvas x:Name="LVCanvas" Margin="10,37,10,10" Background="LightGray" />
            </Grid>
        </GroupBox>
    </Grid>
</Window>
