xaml-sdk/ChartView/WPF/Crosshair/MainWindow.xaml

59 строки
3.2 KiB
XML

<Window x:Class="Crosshair.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Title="MainWindow" Height="550" Width="825">
<FrameworkElement.Resources>
<Style x:Key="horizontalLineLabelStyle" TargetType="telerik:Label">
<Setter Property="Width" Value="50" />
<Setter Property="BorderThickness" Value="1 0 1 1" />
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="Background" Value="#AA8EC441" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
<Style x:Key="verticalLineLabelStyle" TargetType="telerik:Label">
<Setter Property="Width" Value="50" />
<Setter Property="BorderThickness" Value="1 1 1 0" />
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="Background" Value="#AA8EC441" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
</FrameworkElement.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<telerik:RadCartesianChart x:Name="chart1" Margin="2 20 50 2" >
<telerik:RadCartesianChart.PlotAreaStyle>
<Style TargetType="Border">
<Setter Property="BorderBrush" Value="LightGray" />
<Setter Property="BorderThickness" Value="1" />
</Style>
</telerik:RadCartesianChart.PlotAreaStyle>
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:LinearAxis />
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:LinearAxis />
</telerik:RadCartesianChart.VerticalAxis>
<telerik:RadCartesianChart.Series>
<telerik:ScatterPointSeries XValueBinding="Age" YValueBinding="Salary" ItemsSource="{Binding}" />
</telerik:RadCartesianChart.Series>
<telerik:RadCartesianChart.Behaviors>
<telerik:ChartCrosshairBehavior PositionChanged="ChartCrosshairBehavior_PositionChanged" />
</telerik:RadCartesianChart.Behaviors>
</telerik:RadCartesianChart>
<Grid Grid.Column="1" Margin="0 20 5 0">
<TextBlock Text="Chose labels position:" />
<StackPanel TextBlock.FontSize="16" Margin="0 20 0 0">
<RadioButton Content="Outside" Click="RadioButtonOutside_Click" />
<RadioButton Content="Outside and opposite" Click="RadioButtonOutsideAndOpposite_Click" />
<RadioButton Content="Inside" Click="RadioButtonInside_Click" />
<RadioButton Content="Inside and opposite" Click="RadioButtonInsideAndOpposite_Click" />
<RadioButton Content="Follow cursor" Click="RadioButtonFollowCursor_Click" Unchecked="RadioButtonFollowCursor_Unchecked" />
</StackPanel>
</Grid>
</Grid>
</Window>