<navigation:Page x:Class="Disco.Silverlight.AttachmentUpload.WebCam" 
    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:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
    Title="WebCam Capture"
    Style="{StaticResource PageStyle}">
    <Grid x:Name="LayoutRoot">
        <Grid x:Name="WebCamAccessHost" Visibility="Collapsed">
            <Button x:Name="ButtonStartWebCam" Content="START WEBCAM" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="14, 8" />
        </Grid>
        <Grid x:Name="WebCamShow" Visibility="Collapsed">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Border Background="Black">
                <Rectangle x:Name="WebCamHost" OpacityMask="White" />
            </Border>
            <StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Row="1" Margin="0, 10, 0, 0">
                <Button x:Name="ButtonCapture" Content="CAPTURE IMAGE" HorizontalAlignment="Center" Padding="14, 8" />
                <TextBlock x:Name="TextBlockWebCamFormat" HorizontalAlignment="Center" Margin="0, 6, 0, 0"></TextBlock>
            </StackPanel>
        </Grid>
        <Border x:Name="WebCamCaptured" Visibility="Collapsed" Width="600" Height="450" Background="#BBffe3cb" BorderBrush="#FFDB761D" BorderThickness="4" CornerRadius="4">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border Background="Black" Grid.ColumnSpan="4" Margin="14">
                    <Rectangle x:Name="WebCamCapturedImage" />
                </Border>
                <Button x:Name="ButtonCancel" Grid.Row="1" Grid.Column="0" Content="CANCEL" HorizontalAlignment="Center" VerticalAlignment="Bottom" Padding="14, 8" Margin="6" />
                <TextBlock Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="10 0">Comments:</TextBlock>
                <TextBox Grid.Row="1" Grid.Column="2" x:Name="TextBoxComments" Height="24" />
                <Button x:Name="ButtonPost" Grid.Row="1" Grid.Column="3" Content="UPLOAD IMAGE" HorizontalAlignment="Center" VerticalAlignment="Bottom" Padding="14, 8" Margin="6" />
            </Grid>
        </Border>
    </Grid>
</navigation:Page>