-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPageSnapped.xaml
53 lines (53 loc) · 3.11 KB
/
MainPageSnapped.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
<UserControl
x:Class="WhatsThatSound.View.MainPageSnapped"
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:Layout="using:DevExpress.UI.Xaml.Layout"
xmlns:Core="using:DevExpress.Core"
xmlns:View="using:WhatsThatSound.View"
xmlns:ViewModel="using:WhatsThatSound.ViewModel"
d:DesignHeight="768"
d:DesignWidth="320"
mc:Ignorable="d">
<UserControl.Resources>
<Core:ApplicationViewService x:Key="applicationViewService" />
<SolidColorBrush x:Key="ForegroundSemiDarkThemeBrush" Color="#414042" />
</UserControl.Resources>
<Layout:PageAdornerControl Header="Overview">
<Layout:PageAdornerControl.Resources>
<Style TargetType="Layout:Tile">
<Setter Property="Background" Value="{StaticResource ForegroundSemiDarkThemeBrush}"/>
<Setter Property="Command" Value="{Binding Path=TryUnsnapCommand, Source={StaticResource applicationViewService}}"/>
</Style>
</Layout:PageAdornerControl.Resources>
<StackPanel>
<Layout:Tile Header="Details" DataContext="{StaticResource overviewPageViewModel}" NavigationTargetType="OverviewPage">
<TextBlock FontSize="24">
<Run Text="{Binding FirstName}"/>
<LineBreak/>
<Run Text="{Binding LastName}"/>
</TextBlock>
</Layout:Tile>
<Layout:Tile Header="Activities" DataContext="{Binding Activities, Source={StaticResource activitiesPageViewModel}}" NavigationTargetType="GridPage" NavigationTargetParameter="{Binding}">
<Layout:Tile.Resources>
<View:FormatStringConverter x:Key="Converter" />
</Layout:Tile.Resources>
<ItemsControl ItemsSource="{Binding Recent}" VerticalAlignment="Bottom" >
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock FontSize="14" Text="{Binding Date, Converter={StaticResource Converter}, ConverterParameter='{} {0:dd}/{0:MM}/{0:yy}'}" Foreground="#E6E6E6" Padding="10,4,20,4" FontWeight="SemiLight"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Layout:Tile>
<Layout:Tile Header="Events" DataContext="{Binding Events, Source={StaticResource activitiesPageViewModel}}" NavigationTargetType="GridPage" NavigationTargetParameter="{Binding}">
<TextBlock Text="{Binding Count}" FontSize="42"/>
</Layout:Tile>
<Layout:Tile Header="Invoices" DataContext="{Binding Invoices, Source={StaticResource activitiesPageViewModel}}" NavigationTargetType="GridPage" NavigationTargetParameter="{Binding}">
<TextBlock Text="{Binding Count}" FontSize="42"/>
</Layout:Tile>
</StackPanel>
</Layout:PageAdornerControl>
</UserControl>