<UserControl
    x:Class="StockAnalysis.Partial.UserControls.IntegratedChart"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:StockAnalysis.Partial.UserControls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:fchart="using:C1.Xaml.Chart.Finance"
  xmlns:chart="using:C1.Xaml.Chart"
  mc:Ignorable="d"
   d:DesignHeight="300" d:DesignWidth="300" DataContext="{Binding RelativeSource={RelativeSource Self}}" Background="{StaticResource PaperWhite1000}">

  <fchart:C1FinancialChart x:Name="financialChart" ItemsSource="{Binding Model.CurrectQuote.Data}" 
                        BindingX="Date"
                        Binding="High,Low,Open,Close,Volume"
                        ChartType="Candlestick"
                        ToolTipContent="{}{y:n2}"
                        RenderMode="{Binding Model.RenderMode}">
    <FlyoutBase.AttachedFlyout>
      <MenuFlyout>
        <MenuFlyout.MenuFlyoutPresenterStyle>
          <Style TargetType="MenuFlyoutPresenter">           
            <Setter Property="Background" Value="{StaticResource PaperWhite1000}"/>
            <Setter Property="BorderBrush" Value="{StaticResource Blue300}"/>
            <Setter Property="BorderThickness" Value="0.5"/>  
          </Style>
        </MenuFlyout.MenuFlyoutPresenterStyle>
        <MenuFlyoutItem Text="Edit" Click="Edit_Click"/>
        <MenuFlyoutItem Text="Delete" Click="Delete_Click"/>
      </MenuFlyout>
    </FlyoutBase.AttachedFlyout>
    <fchart:C1FinancialChart.Options>
      <fchart:FinancialChartOptions ReversalAmount="2" />
    </fchart:C1FinancialChart.Options>
    <fchart:FinancialSeries x:Name="mainSeries">
      <fchart:FinancialSeries.Style>
        <chart:ChartStyle Fill="#804285f4" Stroke="{StaticResource Blue700}" StrokeThickness="1" />
      </fchart:FinancialSeries.Style>
      <fchart:FinancialSeries.AxisY>
        <chart:Axis Position="Right"></chart:Axis>
      </fchart:FinancialSeries.AxisY>
    </fchart:FinancialSeries>
        <fchart:IchimokuCloud x:Name="ichimoku">
            <fchart:IchimokuCloud.ConversionLineStyle>
                <chart:ChartStyle StrokeThickness="0.7"/>
            </fchart:IchimokuCloud.ConversionLineStyle>
            <fchart:IchimokuCloud.BaseLineStyle>
                <chart:ChartStyle StrokeThickness="0.7"/>
            </fchart:IchimokuCloud.BaseLineStyle>
            <fchart:IchimokuCloud.LeadingSpanALineStyle>
                <chart:ChartStyle StrokeThickness="0.8"/>
            </fchart:IchimokuCloud.LeadingSpanALineStyle>
            <fchart:IchimokuCloud.LeadingSpanBLineStyle>
                <chart:ChartStyle  StrokeThickness="0.8"/>
            </fchart:IchimokuCloud.LeadingSpanBLineStyle>
            <fchart:IchimokuCloud.LaggingLineStyle>
                <chart:ChartStyle StrokeThickness="0.7"/>
            </fchart:IchimokuCloud.LaggingLineStyle>
        </fchart:IchimokuCloud>
        <fchart:BollingerBands x:Name="bollinger" Period="20" Binding="High,Low,Close">
      <fchart:BollingerBands.Style>
        <chart:ChartStyle />
      </fchart:BollingerBands.Style>
    </fchart:BollingerBands>
    <fchart:Envelopes x:Name="envelopes" Period="20" Size="0.03" Binding="High,Low,Close">
      <fchart:Envelopes.Style>
        <chart:ChartStyle />
      </fchart:Envelopes.Style>
    </fchart:Envelopes>
    <fchart:Fibonacci x:Name="retracements" Binding="Close" >
      <fchart:Fibonacci.Style>
        <chart:ChartStyle Stroke="Red" StrokeThickness="0.5" FontSize="10"/>
      </fchart:Fibonacci.Style>
    </fchart:Fibonacci>
    <fchart:FibonacciArcs x:Name="arcs" Binding="Close" StartX="46" StartY="19.75" EndX="54" EndY="17.1">
      <fchart:FibonacciArcs.Style>
        <chart:ChartStyle />
      </fchart:FibonacciArcs.Style>
    </fchart:FibonacciArcs>
    <fchart:FibonacciFans x:Name="fans" Binding="Close" StartX="10" StartY="18.12" EndX="32" EndY="20.53">
      <fchart:FibonacciFans.Style>
        <chart:ChartStyle />
      </fchart:FibonacciFans.Style>
    </fchart:FibonacciFans>
    <fchart:FibonacciTimeZones x:Name="timeZones" Binding="Close" StartX="0" EndX="3">
      <fchart:FibonacciTimeZones.Style>
        <chart:ChartStyle />
      </fchart:FibonacciTimeZones.Style>
    </fchart:FibonacciTimeZones>
  </fchart:C1FinancialChart>
</UserControl>
