1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<Page x:Class="FLY.Thick.Base.UI.UiModule.PgFixAnalyze"
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:FLY.Thick.Base.UI.UiModule"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Background="White"
Title="Page_FixAnalyze">
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Page.Resources>
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="496*" />
</Grid.RowDefinitions>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<lvc:CartesianChart Hoverable="False" DisableAnimations="True" DataTooltip="{x:Null}" Margin="10" MouseDown="UIElement_OnMouseDown">
<lvc:CartesianChart.Series>
<lvc:LineSeries
Values="{Binding Values}"
StrokeThickness = "3"
Stroke = "{StaticResource Brushes.Static}"
Fill = "Transparent"
PointGeometry ="{x:Null}"
/>
</lvc:CartesianChart.Series>
<lvc:CartesianChart.AxisX>
<lvc:Axis FontSize="16" Title="频率 Hz" LabelFormatter="{Binding XFormatter}"
MaxValue="{Binding XMax}"
MinValue="{Binding XMin}">
<lvc:Axis.Separator>
<lvc:Separator Stroke="LightGray"/>
</lvc:Axis.Separator>
<lvc:Axis.Sections>
<lvc:AxisSection Value="{Binding XPointer}"
DataLabel="True"
StrokeThickness="1"
Stroke="Orange"
DisableAnimations="True"
DataLabelForeground="White"
Panel.ZIndex="1"/>
</lvc:Axis.Sections>
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis Title="幅值" MaxValue="{Binding YMax}"
MinValue="{Binding YMin}">
<lvc:Axis.Separator>
<lvc:Separator StrokeThickness="1" Stroke="LightGray" />
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY >
</lvc:CartesianChart>
<Controls:RangeSlider Grid.Row="1"
Margin="{StaticResource ControlMargin}"
Controls:SliderHelper.ChangeValueBy="LargeChange"
Controls:SliderHelper.EnableMouseWheel="MouseHover"
AutoToolTipPlacement="TopLeft"
LargeChange="10"
Maximum="{Binding XRangeSliderMax}"
Minimum="{Binding XRangeSliderMin}"
Orientation="Horizontal"
SmallChange="1"
LowerValue="{Binding LowerValue}"
UpperValue="{Binding UpperValue}" />
<Grid Grid.Row="2" Margin="{StaticResource ControlMargin}">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Button Style="{StaticResource Styles.Button.Square2}" Grid.Column="1" Click="ButtonTestClick" Content="测试"/>
</Grid>
</Grid>
<Grid Background="{StaticResource Brushes.TitleBar.Background}" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" >
<Button Style="{StaticResource Styles.TitleBar.BackButton2}" Command="BrowseBack"/>
<TextBlock Style="{StaticResource Styles.TitleBar.Text}" Text="FFT分析"/>
</StackPanel>
</Grid>
</Grid>
</Page>