<Page
    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:uc="using:StockAnalysis.Partial.UserControls"
  xmlns:cc="using:StockAnalysis.Partial.CustomControls"
  mc:Ignorable="d"
  
  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"/>
  </StackPanel>
</Page>
