<UserControl x:Class="PDFTron.SilverDox.Samples.Controls.AnnotationPropertiesControl"
    x:Name="annotationPropertyControl"
    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:controls="clr-namespace:PDFTron.SilverDox.Samples.Controls"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400"
    Loaded="annotationPropertyControl_Loaded">

    <UserControl.Resources>
        <ResourceDictionary Source="/ReaderControl;component/Resources/ResourceDictionary.xaml"/>
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Background="White">

        <!-- Annotation Property Controls -->
        <StackPanel x:Name="annotationPropertiesStackPanel" Orientation="Vertical" 
                    Visibility="{Binding Path=ShowAnnotationPropertiesPanel,
                                         ElementName=annotationPropertyControl, 
                                         Converter={StaticResource VisibilityConverter}}">

            <!-- FillColor -->
            <StackPanel Margin="0,10,0,10"  
                        Visibility="{ Binding Path=ShowFillColor,  
                                              ElementName=annotationPropertyControl, 
                                              Converter={StaticResource VisibilityConverter}}">
                <TextBlock Text="Fill"/>
                <controls:ColorPicker x:Name="fillColorColorPicker"/>
            </StackPanel>

            <!-- StrokeColor -->
            <StackPanel Margin="0,0,0,10" 
                        Visibility="{
                            Binding Path=ShowStrokeColor,  
                            ElementName=annotationPropertyControl,  
                            Converter={StaticResource VisibilityConverter}}"> 
                <TextBlock Text="Stroke"/>
                <controls:ColorPicker  x:Name="strokeColorColorPicker"/>
            </StackPanel>
            
            <!-- StrokeThickness -->
            <StackPanel Margin="0,0,0,10"
                        Visibility="{
                            Binding Path=ShowStrokeThickness, 
                            ElementName=annotationPropertyControl, 
                            Converter={StaticResource VisibilityConverter}}">
                <TextBlock>
                    <Run Text="Thickness: "/>
                    <Run Text="{Binding Path=Value, ElementName=thicknessSlider}"/>
                </TextBlock>
                
                <Slider x:Name="strokeThicknessSlider" Minimum="1" />
            </StackPanel>

            <!-- Set as Default -->
            <Button x:Name="setAsDefaultButton" Content="Set as Default"
                    Click="setAsDefaultButton_Click"/>
        </StackPanel>

    </Grid>
</UserControl>
