This repository was archived by the owner on Jun 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathHubPage.xaml
More file actions
145 lines (143 loc) · 7.4 KB
/
HubPage.xaml
File metadata and controls
145 lines (143 loc) · 7.4 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<local:SharedBasePage
x:Class="OneNoteServiceSamplesWinUniversal.HubPage"
DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:OneNoteServiceSamplesWinUniversal"
xmlns:data="using:OneNoteServiceSamplesWinUniversal.Data"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.Resources>
<!-- Grid-appropriate 310 by 260 pixel item template as seen in section 4 -->
<DataTemplate x:Key="Standard310x260ItemTemplate">
<Grid Height="250" Width="310" Margin="5,10,5,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Background="{ThemeResource ListViewItemPlaceholderBackgroundThemeBrush}" Height="150">
<Image Source="{Binding ImagePath}" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>
</Border>
<StackPanel Grid.Row="1" Margin="0,10,0,0">
<TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap"/>
<TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextBlockStyle}" MaxHeight="60" />
</StackPanel>
</Grid>
</DataTemplate>
</Page.Resources>
<!--
This grid acts as a root panel for the page.
-->
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.ChildrenTransitions>
<TransitionCollection>
<EntranceThemeTransition/>
</TransitionCollection>
</Grid.ChildrenTransitions>
<Hub SectionHeaderClick="Hub_SectionHeaderClick">
<Hub.Header>
<!-- Back button and page title -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock x:Uid="Header"
Text="OneNote API"
Style="{StaticResource HeaderTextBlockStyle}" VerticalAlignment="Top" IsHitTestVisible="false" TextWrapping="WrapWholeWords"/>
</Grid>
</Hub.Header>
<HubSection Width="440" Margin="0,0,0,0" DataContext="{Binding}">
<DataTemplate>
<ListView
HorizontalContentAlignment="Stretch"
IsSwipeEnabled="True"
ItemsSource="{Binding Groups}"
IsItemClickEnabled="True"
ItemClick="GroupSection_ItemClick">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Title}" Padding="0,30,0,30" LineStackingStrategy="MaxHeight" Style="{StaticResource HeaderTextBlockStyle}"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</DataTemplate>
<HubSection.Background>
<ImageBrush ImageSource="Assets/MediumGray.png" Stretch="UniformToFill" />
</HubSection.Background>
</HubSection>
<HubSection IsHeaderInteractive="True" DataContext="{Binding Groups[0]}" d:DataContext="{Binding Groups[0], Source={d:DesignInstance Type=data:SampleDataSource}}"
x:Uid="CreatePagesSectionHeader" Header="Create Pages" Padding="40,40,40,32">
<DataTemplate>
<GridView
x:Name="itemGridView"
ItemsSource="{Binding Items}"
Margin="-9,-14,0,0"
AutomationProperties.AutomationId="ItemGridView"
AutomationProperties.Name="Items In Group"
ItemTemplate="{StaticResource Standard310x260ItemTemplate}"
SelectionMode="None"
IsSwipeEnabled="false"
IsItemClickEnabled="True"
ItemClick="ItemView_ItemClick">
</GridView>
</DataTemplate>
</HubSection>
<HubSection IsHeaderInteractive="True" DataContext="{Binding Groups[1]}" d:DataContext="{Binding Groups[1], Source={d:DesignInstance Type=data:SampleDataSource}}"
x:Uid="QuerySearchPagesSectionHeader" Header="Query and Search Pages" Padding="40,40,40,32">
<DataTemplate>
<GridView
x:Name="itemGridView"
ItemsSource="{Binding Items}"
Margin="-9,-14,0,0"
AutomationProperties.AutomationId="ItemGridView"
AutomationProperties.Name="Items In Group"
ItemTemplate="{StaticResource Standard310x260ItemTemplate}"
SelectionMode="None"
IsSwipeEnabled="false"
IsItemClickEnabled="True"
ItemClick="ItemView_ItemClick">
</GridView>
</DataTemplate>
</HubSection>
<HubSection IsHeaderInteractive="True" DataContext="{Binding Groups[2]}" d:DataContext="{Binding Groups[2], Source={d:DesignInstance Type=data:SampleDataSource}}"
x:Uid="NotebooksSectionHeader" Header="Manage Notebooks and Sections" Padding="40,40,40,32">
<DataTemplate>
<GridView
x:Name="itemGridView"
ItemsSource="{Binding Items}"
Margin="-9,-14,0,0"
AutomationProperties.AutomationId="ItemGridView"
AutomationProperties.Name="Items In Group"
ItemTemplate="{StaticResource Standard310x260ItemTemplate}"
SelectionMode="None"
IsSwipeEnabled="false"
IsItemClickEnabled="True"
ItemClick="ItemView_ItemClick">
</GridView>
</DataTemplate>
</HubSection>
<HubSection IsHeaderInteractive="True" DataContext="{Binding Groups[3]}" d:DataContext="{Binding Groups[3], Source={d:DesignInstance Type=data:SampleDataSource}}"
x:Uid="UpdatePagesSectionHeader" Header="Update Pages" Padding="40,40,40,32">
<DataTemplate>
<GridView
x:Name="itemGridView"
ItemsSource="{Binding Items}"
Margin="-9,-14,0,0"
AutomationProperties.AutomationId="ItemGridView"
AutomationProperties.Name="Items In Group"
ItemTemplate="{StaticResource Standard310x260ItemTemplate}"
SelectionMode="None"
IsSwipeEnabled="false"
IsItemClickEnabled="True"
ItemClick="ItemView_ItemClick">
</GridView>
</DataTemplate>
</HubSection>
</Hub>
<ToggleSwitch x:Name="O365ToggleSwitch" Header="{Binding TappedEvent, ElementName=O365ToggleSwitch, Mode=OneWay}" HorizontalAlignment="Left" Height="68" Margin="615,35,0,0" VerticalAlignment="Top" Width="229" OffContent="Microsoft Account" OnContent="Microsoft Office 365" ToolTipService.ToolTip="Select the Authentication model" Toggled="O365ToggleSwitch_Toggled" />
<ToggleSwitch x:Name="UseBetaToggleSwitch" Header="{Binding TappedEvent, ElementName=UseBetaToggleSwitch, Mode=OneWay}" HorizontalAlignment="Left" Height="68" Margin="887,35,0,0" VerticalAlignment="Top" Width="229" OffContent="Use 'v1.0' API Route" OnContent="Use 'beta' API route" ToolTipService.ToolTip="Select Beta vs v1.0 API route" Toggled="UseBetaToggleSwitch_Toggled" />
</Grid>
</local:SharedBasePage>