-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
91 lines (91 loc) · 5.21 KB
/
MainWindow.xaml
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
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:GoldPrices"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxrcc="http://schemas.devexpress.com/winfx/2008/xaml/charts/rangecontrolclient"
x:Class="GoldPrices.MainWindow"
mc:Ignorable="d"
dx:ThemeManager.ThemeName="Office2013"
Title="MainWindow" Height="500" Width="800" Loaded="OnLoaded">
<Border BorderThickness="1" Margin="4" BorderBrush="DarkGray">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="10"/>
</Grid.RowDefinitions>
<dxc:ChartControl x:Name="chart"
BorderThickness="0"
Grid.Row="0">
<dxc:ChartControl.Palette>
<dxc:Office2013Palette/>
</dxc:ChartControl.Palette>
<dxc:ChartControl.Legends>
<dxc:Legend Visible="False"/>
</dxc:ChartControl.Legends>
<dxc:ChartControl.Titles>
<dxc:Title Content="Gold Price History in 2010"
HorizontalAlignment="Center"/>
</dxc:ChartControl.Titles>
<dxc:XYDiagram2D x:Name="diagram">
<dxc:XYDiagram2D.NavigationOptions>
<dxc:NavigationOptions/>
</dxc:XYDiagram2D.NavigationOptions>
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D x:Name="axisX">
<dxc:AxisX2D.DateTimeScaleOptions>
<dxc:ContinuousDateTimeScaleOptions WorkdaysOnly="True"
AutoGrid="True"/>
</dxc:AxisX2D.DateTimeScaleOptions>
<dxc:AxisX2D.VisualRange>
<dxc:Range MinValue="{Binding ElementName=rangeControl, Path=SelectionRangeStart, Mode=TwoWay}"
MaxValue="{Binding ElementName=rangeControl, Path=SelectionRangeEnd, Mode=TwoWay}"/>
</dxc:AxisX2D.VisualRange>
<dxc:AxisX2D.WholeRange>
<dxc:Range MinValue="{Binding ElementName=rangeControl, Path=VisibleRangeStart, Mode=TwoWay}"
MaxValue="{Binding ElementName=rangeControl, Path=VisibleRangeEnd, Mode=TwoWay}"/>
</dxc:AxisX2D.WholeRange>
<dxc:AxisX2D.Label>
<dxc:AxisLabel TextPattern="{}{A:MMMM}"/>
</dxc:AxisX2D.Label>
</dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>
<dxc:XYDiagram2D.AxisY>
<dxc:AxisY2D GridLinesMinorVisible="True">
<dxc:AxisY2D.NumericScaleOptions>
<dxc:ContinuousNumericScaleOptions AutoGrid="False"
GridSpacing="50"/>
</dxc:AxisY2D.NumericScaleOptions>
<dxc:AxisY2D.WholeRange>
<dxc:Range dxc:AxisY2D.AlwaysShowZeroLevel="False"/>
</dxc:AxisY2D.WholeRange>
</dxc:AxisY2D>
</dxc:XYDiagram2D.AxisY>
<dxc:LineSeries2D x:Name="series"
DisplayName="Gold Price"
DataSource="{Binding}"
ArgumentDataMember="Date"
ValueDataMember="Price"/>
</dxc:XYDiagram2D>
</dxc:ChartControl>
<dxe:RangeControl x:Name="rangeControl"
Grid.Row="1"
Margin="16,4,16,8">
<dxrcc:DateTimeChartRangeControlClient ItemsSource="{Binding}"
ArgumentDataMember="Date"
ValueDataMember="Price"
GridAlignment="Month"
GridSpacing="2">
<dxrcc:DateTimeChartRangeControlClient.View>
<dxrcc:RangeControlClientLineView MarkerSize="2"/>
</dxrcc:DateTimeChartRangeControlClient.View>
</dxrcc:DateTimeChartRangeControlClient>
</dxe:RangeControl>
</Grid>
</Border>
</Window>