-
Notifications
You must be signed in to change notification settings - Fork 500
/
Copy pathMainPage.xaml
79 lines (72 loc) · 3.49 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!-- <SnippetMainPageXAMLFull> -->
<Page
x:Class="ItemsControlGroupingSnippets.MainPage"
IsTabStop="false"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ItemsControlGroupingSnippets"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<UserControl.Resources>
<!-- <SnippetCVSIsSourceGrouped> -->
<CollectionViewSource x:Name="cvsActivities" IsSourceGrouped="True"/>
<!-- </SnippetCVSIsSourceGrouped> -->
<!-- <SnippetCVSItemsPath> -->
<CollectionViewSource x:Name="cvsProjects" IsSourceGrouped="True" ItemsPath="Activities"/>
<!-- </SnippetCVSItemsPath> -->
<!-- <SnippetGroupStyleSelectorXAML> -->
<local:ListGroupStyleSelector x:Key="listGroupStyleSelector"/>
<!-- </SnippetGroupStyleSelectorXAML> -->
</UserControl.Resources>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="600"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!-- <SnippetGroupedListViewXAML> -->
<ListView ItemsSource="{Binding Source={StaticResource cvsActivities}}"
ItemTemplate="{StaticResource listViewItemTemplate}"
GroupStyleSelector="{StaticResource listGroupStyleSelector}"
Margin="120" Width="320"/>
<!-- </SnippetGroupedListViewXAML> -->
<!-- <SnippetGroupedGridViewXAML> -->
<!-- <SnippetGroupedGridViewOpenTagXAML> -->
<GridView ItemsSource="{Binding Source={StaticResource cvsProjects}}"
Margin="0,120,0,0" MaxHeight="500" Grid.Column="1">
<!-- </SnippetGroupedGridViewOpenTagXAML> -->
<GridView.ItemTemplate>
<DataTemplate>
<StackPanel Margin="20">
<TextBlock Text="{Binding Name}" FontWeight="Bold"
Style="{StaticResource BaseTextBlockStyle}"/>
<TextBlock Text="{Binding DueDate}" TextWrapping="NoWrap"
Style="{StaticResource BodyTextBlockStyle}" />
<CheckBox Content="Complete" IsChecked="{Binding Complete}"
IsEnabled="False"/>
</StackPanel>
</DataTemplate>
</GridView.ItemTemplate>
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<ItemsWrapGrid MaximumRowsOrColumns="3"/>
</ItemsPanelTemplate>
</GridView.ItemsPanel>
<GridView.GroupStyle>
<GroupStyle HidesIfEmpty="True">
<GroupStyle.HeaderTemplate>
<DataTemplate>
<Grid Background="LightGray" Margin="0">
<TextBlock Text='{Binding Name}'
Foreground="Black" Margin="30"
Style="{StaticResource HeaderTextBlockStyle}"/>
</Grid>
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</GridView.GroupStyle>
</GridView>
<!-- </SnippetGroupedGridViewXAML> -->
</Grid>
</Page>
<!-- </SnippetMainPageXAMLFull> -->