<Window x:Class="StockAnalysis.Partial.AnnotationSettings"
        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:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:cc ="clr-namespace:StockAnalysis.Partial.CustomControls"
        xmlns:uc ="clr-namespace:StockAnalysis.Partial.UserControls"
        xmlns:local="clr-namespace:StockAnalysis.Partial"
        mc:Ignorable="d"
        WindowStyle="SingleBorderWindow"
        ResizeMode="NoResize"
        Background="{StaticResource PaperWhite1000}"
        Height="480" Width="300" x:Name="window" DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}">
    <StackPanel Margin="0, 15">
        <TextBlock Grid.Row="0" Text="{Binding Key}"
                   FontWeight="Bold" FontSize="18"
                   HorizontalAlignment="Center" Margin="0,0,0,15" />
        <StackPanel Orientation="Vertical" Margin="10,5"   SizeChanged="StackPanel_SizeChanged">
            <uc:AnnotationShapeSettings x:Name="annotationShapeSettings" DataContext="{Binding Model.AnnotationStyle}"
                                        Visibility="{Binding Model.NewAnnotationType, ElementName=window, Converter={StaticResource NewAnnotationType2VisibilityConverter}, ConverterParameter=Shape}"
                 />
            <uc:AnnotationTextSettings x:Name="annotationTextSettings" DataContext="{Binding Model.AnnotationStyle}"
                                        Visibility="{ Binding Model.NewAnnotationType, ElementName=window, Converter={StaticResource NewAnnotationType2VisibilityConverter}, ConverterParameter=Text}"
                />
        </StackPanel>
        <cc:FlatButton Content="DONE"
                       Margin="20, 5" HorizontalAlignment="Center" Padding="20, 5"
            IsCancel="True" SnapsToDevicePixels="True" />
    </StackPanel>
</Window>
