Files
aistudio-wpf-diagram/Live-Charts-master/Examples/Wpf/CartesianChart/ManualZAndP/ManualZAndPExample.xaml
2021-07-23 09:42:22 +08:00

33 lines
1.6 KiB
XML

<UserControl x:Class="Wpf.CartesianChart.ManualZAndP.ManualZAndPExample"
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:Wpf.CartesianChart.ManualZAndP"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal">
<Button Click="PrevOnClick">Prev</Button>
<Button Click="NextOnClick">Next</Button>
</StackPanel>
<Button Grid.Row="1" Click="ManualZoom" HorizontalAlignment="Left">Zoom to 5 &gt; x &lt; 10</Button>
<lvc:CartesianChart Grid.Row="2">
<lvc:CartesianChart.Series>
<lvc:LineSeries Values="{Binding Values}"></lvc:LineSeries>
</lvc:CartesianChart.Series>
<lvc:CartesianChart.AxisX>
<lvc:Axis MinValue="{Binding From}" MaxValue="{Binding To}"
Separator="{x:Static lvc:DefaultAxes.CleanSeparator}">
</lvc:Axis>
</lvc:CartesianChart.AxisX>
</lvc:CartesianChart>
</Grid>
</UserControl>