This repository has been archived by the owner on Apr 13, 2024. It is now read-only.
/
MainPage.xaml
61 lines (53 loc) · 2.47 KB
/
MainPage.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
<phone:PhoneApplicationPage
x:Class="DataVisualizationOnWindowsPhone.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
xmlns:local="clr-namespace:DataVisualizationOnWindowsPhone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
shell:SystemTray.IsVisible="False">
<phone:PhoneApplicationPage.Resources>
<!-- Data -->
<local:Activities x:Key="Activities"/>
</phone:PhoneApplicationPage.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Title -->
<TextBlock
Grid.Row="0"
Text="DataVisualizationOnWindowsPhone"
Style="{StaticResource PhoneTextNormalStyle}"/>
<Grid Grid.Row="1">
<!-- Chart sample -->
<charting:Chart
x:Name="myChart"
Title="static chart"
LegendTitle="legend"
Style="{StaticResource PhoneChartStyle}"
Template="{StaticResource PhoneChartPortraitTemplate}">
<!-- Series -->
<charting:PieSeries
ItemsSource="{StaticResource Activities}"
DependentValuePath="Count"
IndependentValuePath="Activity">
<charting:PieSeries.LegendItemStyle>
<Style TargetType="charting:LegendItem">
<Setter Property="Margin" Value="5 0 5 0"/>
</Style>
</charting:PieSeries.LegendItemStyle>
</charting:PieSeries>
</charting:Chart>
</Grid>
</Grid>
</phone:PhoneApplicationPage>