<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:uc ="clr-namespace:StockAnalysis.Partial.UserControls"
             xmlns:cc="clr-namespace:StockAnalysis.Partial.CustomControls"
             xmlns:cvt="clr-namespace:StockAnalysis.Converter"
             xmlns:local="clr-namespace:StockAnalysis.Partial.UserControls"
             xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
             xmlns:System="clr-namespace:System;assembly=mscorlib"
             x:Class="StockAnalysis.Partial.UserControls.AnnotationSettings"
             mc:Ignorable="d" 
             d:DesignHeight="29" d:DesignWidth="600" DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}">
    <Grid Background="{StaticResource PaperWhite1000}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <StackPanel Grid.Row="1" Grid.Column="1" Background="{StaticResource PaperWhite800}" HorizontalAlignment="Left" Orientation="Horizontal">
            <cc:DropdownControl x:Name="dropdownControl" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" Margin="1,0,0,0" MinWidth="210"
                                 Display="{Binding Model}">
                <cc:DropdownControl.DisplayTemplate>
                    <DataTemplate>
                        <TextBlock>
                        <Run Text="Annotation type: " />
                        <Run Text="{Binding NewAnnotationType}" />
                        </TextBlock>
                    </DataTemplate>
                </cc:DropdownControl.DisplayTemplate>
                <cc:DropdownControl.DropdownHeader>
                    <TextBlock Margin="10,0" Text="ANNOTATION TYPE" Foreground="{StaticResource Blue500}" FontSize="12" FontWeight="DemiBold"  />
                </cc:DropdownControl.DropdownHeader>
                <cc:DropdownControl.Content>
                    <local:Annotations />
                </cc:DropdownControl.Content>
            </cc:DropdownControl>

            <!--<Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <local:AnnotationShapeSettings Visibility="{Binding Model.NewAnnotationType, Converter={StaticResource NewAnnotationType2VisibilityConverter}, ConverterParameter=Shape}" />
                <local:AnnotationTextSettings Visibility="{Binding Model.NewAnnotationType, Converter={StaticResource NewAnnotationType2VisibilityConverter}, ConverterParameter=Text}" Grid.Column="1" />
                
            </Grid>-->
            <cc:MyComboBox x:Name="strokeComboBox" Visibility="Collapsed" Grid.Column="2" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" Margin="1,0,0,0" Display="{Binding Model}">
                <cc:MyComboBox.DisplayTemplate>
                    <DataTemplate>
                        <Rectangle Width="18" Height="14" Stroke="{Binding AnnotationStyle.Stroke, Converter={StaticResource Color2BrushConverter}}" StrokeThickness="2" />
                    </DataTemplate>
                </cc:MyComboBox.DisplayTemplate>
                <cc:MyComboBox.DropdownHeader>
                    <TextBlock Margin="10,0" Text="ANNOTATION STROKE COLOR" Foreground="{StaticResource Blue500}" FontSize="12" FontWeight="DemiBold"  />
                </cc:MyComboBox.DropdownHeader>
                <cc:MyComboBox.Content>
                    <cc:MyBasicColorPickerPart Background="White" Margin="15,0" Foreground="{StaticResource Grey700}" SelectedColor="{Binding Model.AnnotationStyle.Stroke, Mode=TwoWay}" />
                </cc:MyComboBox.Content>
            </cc:MyComboBox>
            <cc:MyComboBox x:Name="fillComboBox" Visibility="Collapsed" Grid.Column="2" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" Margin="1,0,0,0" Display="{Binding Model}">
                <cc:MyComboBox.DisplayTemplate>
                    <DataTemplate>
                        <Border>
                            <Border.Background>
                                <ImageBrush ImageSource="/StockAnalysis;component/Resources/TransparentBase.png" />
                            </Border.Background>
                            <Rectangle Width="18" Height="14" Fill="{Binding AnnotationStyle.Fill, Mode=TwoWay, Converter={StaticResource Color2BrushConverter}}" />
                        </Border>
                    </DataTemplate>
                </cc:MyComboBox.DisplayTemplate>
                <cc:MyComboBox.DropdownHeader>
                    <TextBlock Margin="10,0" Text="ANNOTATION FILL COLOR" Foreground="{StaticResource Blue500}" FontSize="12" FontWeight="DemiBold"  />
                </cc:MyComboBox.DropdownHeader>
                <cc:MyComboBox.Content>
                    <cc:MyBasicColorPickerPart Background="White" Margin="15,0" Foreground="{StaticResource Grey700}" SelectedColor="{Binding Model.AnnotationStyle.Fill, Mode=TwoWay}" />
                </cc:MyComboBox.Content>
            </cc:MyComboBox>

            <cc:DropdownControl x:Name="fontDropdownControl" Visibility="Collapsed" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" Margin="1,0,0,0" MinWidth="80"
                                 Display="{Binding Model.AnnotationStyle}">
                <cc:DropdownControl.DisplayTemplate>
                    <DataTemplate>
                        <TextBlock>
                        <Run Text="Font: " />
                        <Run Text="{Binding FontFamily}"  FontFamily="{Binding FontFamily}" />
                        </TextBlock>
                    </DataTemplate>
                </cc:DropdownControl.DisplayTemplate>
                <cc:DropdownControl.DropdownHeader>
                    <TextBlock Margin="10,0" Text="FONT STYlE" Foreground="{StaticResource Blue500}" FontSize="12" FontWeight="DemiBold"  />
                </cc:DropdownControl.DropdownHeader>
                <cc:DropdownControl.Content>
                    <uc:AnnotationTextSettings x:Name="annotationTextSettings" Margin="10, 0" />
                </cc:DropdownControl.Content>
            </cc:DropdownControl>

            <Border Grid.Column="2" Background="White" Margin="1,0,0,0" />
        </StackPanel>
    </Grid>
</UserControl>
