<UserControl x:Class="TradeBlotter.Views.StochasticsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"              
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:dc="clr-namespace:TradeBlotter.UIUtils"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:wpfx="http://schemas.xceed.com/wpf/xaml/toolkit"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <wpfx:BusyIndicator Name="BusyBar" IsBusy="{Binding Path=BusyIndicator}" BusyContent="Generating Stochastics...">
    <Grid Background="LightGray">
        <DockPanel>
            <Grid Margin="4">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="6" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="3" />
                    <RowDefinition Height="30" />
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Vertical">
                <Label Content="Watch List" HorizontalAlignment="Left" ></Label>
                <ComboBox ItemsSource="{Binding Path=WatchListNames, Mode=OneTime}" SelectedItem="{Binding Path=SelectedWatchList, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" ></ComboBox>
                <!--<Label Content="Symbol" HorizontalAlignment="Left" Target="{Binding ElementName=tradeDateLbl}" ></Label>-->
                <Label Content="Symbol" HorizontalAlignment="Left" ></Label>									
                <ComboBox x:Name="symbolCmb" ItemsSource="{Binding Path=Symbols, Mode=OneWay}" SelectedItem="{Binding Path=SelectedSymbol, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" >
								<ComboBox.ItemsPanel>
									<ItemsPanelTemplate>
										<VirtualizingStackPanel/>
									</ItemsPanelTemplate>
								</ComboBox.ItemsPanel>
						</ComboBox>
                <Label Content="Day Count" HorizontalAlignment="Left" ></Label>
                <ComboBox ItemsSource="{Binding Path=DayCounts, Mode=OneWay}" SelectedItem="{Binding Path=SelectedDayCount, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" ></ComboBox>
                <Button Margin="0,2" Content="Refresh" HorizontalAlignment="Left" Command="{Binding Path=RefreshCommand}"></Button>
                <CheckBox Margin="0,2" Content="Legend Visible" HorizontalAlignment="Left" IsChecked="{Binding Path=CheckBoxLegendVisible, Mode=TwoWay}"></CheckBox>
                </StackPanel>
            </Grid>
              <d3:ChartPlotter Background="WhiteSmoke" Name="stochastics" Margin="10,10,20,10" LegendVisibility="Hidden" dc:ChartPlotterLegendBehavior.LegendVisibleProperty="{Binding Path=LegendVisible}" d3:Viewport2D.UsesApproximateContentBoundsComparison="False" >
                <d3:ChartPlotter.MainHorizontalAxis>
                    <d3:HorizontalDateTimeAxis Name="dateAxis"/>
                </d3:ChartPlotter.MainHorizontalAxis>
                <d3:ChartPlotter.MainVerticalAxis>
                  <d3:VerticalAxis Name="countAxis"/>
                </d3:ChartPlotter.MainVerticalAxis>
                <d3:LineGraph d3:NewLegend.Description="%K" x:Name="PcntK" DataSource="{Binding Path=PcntK}" Stroke="Green" StrokeThickness="2" />
                <d3:LineGraph d3:NewLegend.Description="%D(Signal)" x:Name="PcntD" DataSource="{Binding Path=PcntD}" Stroke="Red"  StrokeThickness="2" />
                <d3:Header FontFamily="Arial" Content="{Binding Path=Title}"/>
                <d3:VerticalAxisTitle FontFamily="Arial" Content="Percent"/>
                <d3:HorizontalAxisTitle FontFamily="Arial" Content="Date" />
                <d3:CursorCoordinateGraph Name="cursorGraph" dc:CoordinateGraphBehavior.XTextMappingProperty="MM/dd/yyyy" LineStrokeThickness="1"/>
                <!--<d3:AxisCursorGraph></d3:AxisCursorGraph>-->
            </d3:ChartPlotter>
        </DockPanel>
    </Grid>
</wpfx:BusyIndicator>
</UserControl>
