<UserControl x:Class="FinancialChartExplorer.RangeSelector"
             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:local="clr-namespace:FinancialChartExplorer"
             xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}">
    <Grid Margin="0 0 10 0">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="100" />
        </Grid.RowDefinitions>
        <c1:C1FinancialChart ToolTipContent="{}Date: {Date}&#x000A;Open: {Open}&#x000A;High: {High}&#x000A;Low: {Low}&#x000A;Close: {Close}" BindingX="Date" Binding="High,Low,Open,Close,Volume" ChartType="Candlestick" ItemsSource="{Binding Data}">
            <c1:FinancialSeries />
            <c1:C1FinancialChart.AxisX>
                <c1:Axis Min="{Binding Source={x:Reference Name=rangeSelector}, Path=LowerValue}" Max="{Binding Source={x:Reference Name=rangeSelector}, Path=UpperValue}" />
            </c1:C1FinancialChart.AxisX>
        </c1:C1FinancialChart>
        <c1:C1FinancialChart x:Name="financialChart" BindingX="Date" Binding="Close" ChartType="Line" ToolTip="{x:Null}" Grid.Row="1" ItemsSource="{Binding Data}">
            <c1:FinancialSeries />
            <c1:C1FinancialChart.Layers>
                <c1:C1RangeSelector x:Name="rangeSelector" />
            </c1:C1FinancialChart.Layers>
        </c1:C1FinancialChart>
    </Grid>
</UserControl>
