<UserControl x:Class="CurrencyComparison.CurrencyComparisonDemo"
             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:c1="http://schemas.componentone.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:CurrencyComparison"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="800">
    <Grid>
        <Grid.Resources>
            <Style TargetType="RadioButton">
                <Setter Property="Margin" Value="10 0" />
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="100" />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Margin="70 0">
            <StackPanel.Resources>
                <Style TargetType="c1:C1ComboBox">
                    <Setter Property="Width" Value="150" />
                    <Setter Property="Margin" Value="20 0" />
                    <Setter Property="VerticalContentAlignment" Value="Center" />
                    <Setter Property="IsEditable" Value="False" />
                    <Setter Property="SelectedBackground" Value="Transparent" />
                </Style>
                <Style TargetType="TextBlock">
                    <Setter Property="VerticalAlignment" Value="Center"/>
                </Style>
            </StackPanel.Resources>
            <TextBlock Text="Base Currency:"/>
            <c1:C1ComboBox x:Name="cbCurrencies" ItemsSource="{Binding Currencies}" DisplayMemberPath="DisplayName" SelectedValuePath="Symbol" SelectedItemChanged="HandleCurrenciesSelectedItemChanged" />
            <TextBlock Text="Measure:" />
            <c1:C1ComboBox x:Name="cbMeasureModes" ItemsSource="{Binding DictMeasureMode}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedItemChanged="HandleMeasureModesSelectedItemChanged"/>
            <Image Source="/CurrencyComparison.4;component/Resources/ImgLegend.png" />
            <TextBlock x:Name="tbPeriod" Margin="20 0"/>
        </StackPanel>
        <c1:C1FlexChart x:Name="mainChart" Background="White" ChartType="Line" LegendToggle="True" LegendPosition="Top" BindingX="Date" Grid.Row="1" Rendered="HandleMainChartRendered" MouseMove="HandleMainChartMouseMove">
            <c1:C1FlexChart.AxisY>
                <c1:Axis AxisLine="True" Title="Exchange Rate" />
            </c1:C1FlexChart.AxisY>
        </c1:C1FlexChart>
        <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center">
            <RadioButton Content="5 Days" Tag="5D" Checked="HandleRadioButtonChecked" />
            <RadioButton Content="10 Days" Tag="10D" Checked="HandleRadioButtonChecked"/>
            <RadioButton Content="1 Month" Tag="1M" Checked="HandleRadioButtonChecked"/>
            <RadioButton Content="6 Months" IsChecked="True" Tag="6M" Checked="HandleRadioButtonChecked"/>
            <RadioButton Content="1 Year" Tag="1Y" Checked="HandleRadioButtonChecked"/>
            <RadioButton Content="5 Years" Tag="5Y" Checked="HandleRadioButtonChecked"/>
            <RadioButton Content="10 Years" Tag="10Y" Checked="HandleRadioButtonChecked"/>
        </StackPanel>
        <c1:C1FlexChart x:Name="rangeChart" ToolTip="{x:Null}" BindingX="Date" LegendPosition="None" ChartType="Line" Grid.Row="3" Rendered="HandleRangeChartRendered">
            <c1:C1FlexChart.AxisX>
                <c1:Axis MajorUnit="366" Position="Bottom" />
            </c1:C1FlexChart.AxisX>
            <c1:C1FlexChart.AxisY>
                <c1:Axis AxisLine="False" Labels="False" MajorGrid="False" MinorTickMarks="None" MajorTickMarks="None" Position="Left" />
            </c1:C1FlexChart.AxisY>
            <c1:C1FlexChart.Layers>
                <c1:C1RangeSelector x:Name="rangeSelector" ValueChanged="HandleRangeSelectorValueChanged"/>
            </c1:C1FlexChart.Layers>
        </c1:C1FlexChart>
    </Grid>
</UserControl>
