-
Notifications
You must be signed in to change notification settings - Fork 28
/
Dashboard.xaml
163 lines (148 loc) · 9.4 KB
/
Dashboard.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
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!-- Copyright (c) Microsoft Corporation and Contributors. -->
<!-- Licensed under the MIT License. -->
<Page
x:Class="ITATKWinUI.Dashboard"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ITATKWinUI"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
>
<Page.Resources>
<CollectionViewSource x:Name="scriptCards" IsSourceGrouped="True" ItemsPath="CardData"/>
<CollectionViewSource x:Name="featuredCards" IsSourceGrouped="True" ItemsPath="CardData"/>
</Page.Resources>
<Grid Margin="40,40,40,0">
<ParallaxView Source="{Binding ElementName=headerImage}" VerticalAlignment="Top" Height="256">
<Grid CornerRadius="5">
<Image x:Name="headerImage" HorizontalAlignment="Center" Source="/Assets/DashboardBanner4.jpg" Stretch="UniformToFill" />
</Grid>
</ParallaxView>
<TextBlock AutomationProperties.AutomationId="__ClickableAreaTextBlock" />
<StackPanel Orientation="Vertical" Margin="50,80,0,20">
<TextBlock x:Name="DashboardHeaderText" Foreground="#000000" Style="{StaticResource TitleTextBlockStyle}" Text="IT Admin Toolkit"/>
<TextBlock x:Name="DashboardSubHeaderText" Foreground="#000000" Style="{StaticResource SubtitleTextBlockStyle}" Text="A customizable and expandable destination for centralizing day-to-day job functions"/>
</StackPanel>
<StackPanel Name="DashboardContent" Margin="0,275,0,0">
<TextBlock Style="{StaticResource SubtitleTextBlockStyle}" Foreground="{ThemeResource ApplicationForegroundThemeBrush}" Text="Featured Items" Name="FeaturedItemsTextHeader"/>
<GridView ItemsSource="{Binding Source={StaticResource featuredCards}}" x:Name="FeaturedItemGridView" ItemClick="FeaturedItemGridView_ItemClick" SelectionMode="None" IsItemClickEnabled="True" MaxHeight="200" Padding="0">
<GridView.ItemTemplate>
<DataTemplate>
<!--Template here-->
<Grid Height="150" Width="150" CornerRadius="5" AutomationProperties.LabeledBy="{Binding ElementName=TitleText}">
<Grid.RowDefinitions>
<RowDefinition Height="102" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Image
Source="{Binding pictureAssetName, Mode=OneWay}"
Stretch="Fill"
HorizontalAlignment="Center"/>
<Grid Height="48" Opacity="1" Grid.Row="1" HorizontalAlignment="Stretch" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}">
<TextBlock x:Name="TitleText" Text="{Binding Title, Mode=OneWay}"
Margin="16,0"
Style="{StaticResource BodyStrongTextBlockStyle}"
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
VerticalAlignment="Center"
TextWrapping="Wrap" />
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="12" FontSize="16"/>
</Grid>
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
<GridView.ItemContainerStyle>
<Style TargetType="GridViewItem">
<Setter Property="Margin" Value="0,5,5,2"/>
</Style>
</GridView.ItemContainerStyle>
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<ItemsWrapGrid MaximumRowsOrColumns="5" Orientation="Vertical" />
</ItemsPanelTemplate>
</GridView.ItemsPanel>
</GridView>
<TextBlock Style="{StaticResource SubtitleTextBlockStyle}" Foreground="{ThemeResource ApplicationForegroundThemeBrush}" Text="Recently Added Scripts" Name="RecentlyAddedTextHeader" Margin="0,15,0,15"/>
<GridView ItemsSource="{Binding Source={StaticResource scriptCards}}" x:Name="RecentlyAddedGridview" SelectionMode="None" IsItemClickEnabled="True" ItemClick="RecentlyAddedGridview_ItemClick" MaxHeight="500" Padding="0">
<GridView.ItemTemplate>
<DataTemplate>
<!--Template here-->
<Grid
Width="360"
Height="90"
Padding="8"
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="{StaticResource ControlCornerRadius}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState>
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="{StaticResource Breakpoint640Plus}" />
</VisualState.StateTriggers>
<VisualState.Setters />
</VisualState>
<VisualState>
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="0" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="controlRoot.Width" Value="Auto" />
<Setter Target="controlRoot.Height" Value="120" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid Width="72" CornerRadius="{ThemeResource ControlCornerRadius}">
<Image
Width="48"
VerticalAlignment="Center"
AutomationProperties.Name="{Binding Title, Mode=OneWay}"
Source="{Binding psVersion, Mode=OneWay}"
Stretch="Uniform" />
</Grid>
<RelativePanel Grid.Column="1" Grid.ColumnSpan="2" Margin="16,6,0,0">
<TextBlock
x:Name="titleText"
Style="{StaticResource BodyStrongTextBlockStyle}"
Text="{Binding Title, Mode=OneWay}"
TextLineBounds="TrimToCapHeight"
TextWrapping="NoWrap" />
<TextBlock
Style="{StaticResource CaptionTextBlockStyle}"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Margin="0,2,8,0"
RelativePanel.Below="titleText"
Text="{Binding SubTitle, Mode=OneWay}"
TextTrimming="CharacterEllipsis" />
</RelativePanel>
<Grid
Margin="0"
Grid.Column="2"
VerticalAlignment="Top"
CornerRadius="{StaticResource ControlCornerRadius}" >
<Ellipse Fill="{ThemeResource SystemAccentColorDark1}" Width="12" Height="12"/>
</Grid>
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
<GridView.ItemContainerStyle>
<Style TargetType="GridViewItem">
<Setter Property="Margin" Value="0,0,2,2"/>
</Style>
</GridView.ItemContainerStyle>
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<ItemsWrapGrid Orientation="Horizontal" />
</ItemsPanelTemplate>
</GridView.ItemsPanel>
</GridView>
</StackPanel>
</Grid>
</Page>