<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="ChartSamples.MultipleAxes" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1c="clr-namespace:C1.WPF.C1Chart;assembly=C1.WPF.C1Chart.4" xmlns:local="clr-namespace:ChartSamples" xmlns:sys="clr-namespace:System;assembly=mscorlib">
    <UserControl.Resources>
        <Style x:Key="sstyle" TargetType="{x:Type c1c:PlotElement}">
            <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
            <Setter Property="RenderTransform">
                <Setter.Value>
                    <TransformGroup>
                        <ScaleTransform ScaleX="0.6" ScaleY="0.6" />
                        <TranslateTransform />
                    </TransformGroup>
                </Setter.Value>
            </Setter>
            <EventSetter Event="Loaded" Handler="Symbol_Loaded" />
        </Style>
    </UserControl.Resources>
    <Grid>
       <Border>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <c1c:C1Chart Name="chart" ChartType="LineSymbols" Margin="0" Padding="0"><!--Theme="{DynamicResource {ComponentResourceKey TypeInTargetAssembly=c1c:C1Chart, ResourceId=MediaPlayer}}"-->
                    <c1c:C1Chart.Data>
                        <c1c:ChartData>
                            <c1c:DataSeries Label="S1" Values="1,4,9,25,9,4,1" />
                            <c1c:DataSeries Label="S2" Values="4,3,2,1,2,3,4" />
                        </c1c:ChartData>
                    </c1c:C1Chart.Data>
                    <c1c:C1Chart.View>
                        <c1c:ChartView Margin="40,2,38,16">
                            <c1c:ChartView.AxisX>
                                <c1c:Axis AxisType="X" IsTime="True" AnnoFormat="dd-MMM" Scale="0.2">
                                </c1c:Axis>
                            </c1c:ChartView.AxisX>
                            <c1c:ChartView.AxisY>
                                <c1c:Axis MajorGridFill="#4cFFFFFF">
                                    <c1c:Axis.Title>
                                        <TextBlock Text="Fahrenheit" />
                    </c1c:Axis.Title>
                                    <c1c:Axis.AnnoTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding RelativeSource={x:Static RelativeSource.Self},                                             Path=(c1c:Axis.DataPoint).Value}" Foreground="{Binding RelativeSource={x:Static RelativeSource.Self},                                             Path=(c1c:Axis.DataPoint).Value,                                             Converter={x:Static local:AxisAnnoConverter.Default}}" />
                                    </DataTemplate>
                                    </c1c:Axis.AnnoTemplate>
                                </c1c:Axis>
                            </c1c:ChartView.AxisY>
                            <c1c:Axis Position="Far" AxisType="Y" Min="{Binding ElementName=chart,Path=View.AxisY.Min,Converter={x:Static local:Far2CelConverter.Default}}" Max="{Binding ElementName=chart,Path=View.AxisY.Max,Converter={x:Static local:Far2CelConverter.Default}}">
                                <c1c:Axis.Title>
                                    <TextBlock Text="Celsius" />
                  </c1c:Axis.Title>
                                <c1c:Axis.AnnoTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding RelativeSource={x:Static RelativeSource.Self},                                             Path=(c1c:Axis.DataPoint).Value}" Foreground="{Binding RelativeSource={x:Static RelativeSource.Self},                                             Path=(c1c:Axis.DataPoint).Value,                                             Converter={x:Static local:AxisAnnoConverter.Default}}" />
                                    </DataTemplate>
                                </c1c:Axis.AnnoTemplate>
                            </c1c:Axis>
                        </c1c:ChartView>
                    </c1c:C1Chart.View>
                    <c1c:Legend BorderThickness="1" DockPanel.Dock="Top" Orientation="Horizontal" />
                </c1c:C1Chart>
                <ComboBox Name="scale" HorizontalAlignment="Left" Grid.Row="1" Width="40" SelectionChanged="scale_SelectionChanged" SelectedIndex="0" ToolTip="Change x-axis scale">
                    <sys:Double>0.2</sys:Double>
                    <sys:Double>0.5</sys:Double>
                    <sys:Double>1</sys:Double>
                </ComboBox>
                <ScrollBar Name="sb" Grid.Row="1" Margin="40,0,34,0" DockPanel.Dock="Bottom" Minimum="0" Maximum="1" Orientation="Horizontal" ViewportSize="0.25" LargeChange="0.25" SmallChange="0.125" Value="{Binding ElementName=chart,Path=View.AxisX.Value}" />
            </Grid>
        </Border>
    </Grid>
</UserControl>