5
5
xmlns : controls =" using:Microsoft.Toolkit.Uwp.UI.Controls"
6
6
xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
7
7
xmlns : local =" using:Files"
8
+ xmlns : muxc =" using:Microsoft.UI.Xaml.Controls"
8
9
xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
9
10
Background =" {ThemeResource ApplicationPageBackgroundThemeBrush}"
10
11
mc : Ignorable =" d" >
11
- <UserControl .Resources>
12
- <Style
13
- x : Key =" AdaptiveGridViewItemContainerStyle2"
14
- BasedOn =" {StaticResource GridViewItemExpanded}"
15
- TargetType =" GridViewItem" >
16
- <Setter Property =" Background" Value =" Transparent" />
17
- <Setter Property =" BorderThickness" Value =" 0" />
18
- <Setter Property =" CornerRadius" Value =" 4" />
19
- <Setter Property =" HorizontalContentAlignment" Value =" Stretch" />
20
- <Setter Property =" VerticalContentAlignment" Value =" Stretch" />
21
- <Setter Property =" Margin" Value =" 0,0,8,0" />
22
- </Style >
23
- </UserControl .Resources>
24
-
25
12
<Grid >
26
- <controls : AdaptiveGridView
13
+ <muxc : ItemsRepeater
27
14
x : Name =" CardsList"
28
15
Grid.Row=" 0"
29
16
HorizontalAlignment =" Stretch"
30
- DesiredWidth =" 100"
31
- IsItemClickEnabled =" True"
32
- ItemContainerStyle =" {StaticResource AdaptiveGridViewItemContainerStyle2}"
33
- ItemHeight =" 90"
34
- ItemsSource =" {x:Bind local:LibraryCards.itemsAdded}"
35
- OneRowModeEnabled =" True"
36
- ScrollViewer.HorizontalScrollBarVisibility=" Hidden"
37
- SelectionMode =" None"
38
- StretchContentForSingleRow =" True" >
39
- <controls : AdaptiveGridView .ItemTemplate>
17
+ ItemsSource =" {x:Bind local:LibraryCards.itemsAdded}" >
18
+ <muxc : ItemsRepeater .Layout>
19
+ <muxc : UniformGridLayout ItemsStretch =" Fill" Orientation =" Horizontal" MinItemWidth =" 100" MaximumRowsOrColumns =" 5" MinItemHeight =" 90" MinRowSpacing =" 8" MinColumnSpacing =" 8" />
20
+ </muxc : ItemsRepeater .Layout>
21
+ <muxc : ItemsRepeater .ItemTemplate>
40
22
<DataTemplate x : DataType =" local:FavoriteLocationItem" >
41
23
<Grid >
42
- <Grid >
43
- <Grid .Resources>
44
- <ResourceDictionary >
45
- <ResourceDictionary .ThemeDictionaries>
46
- <ResourceDictionary x : Name =" Light" >
47
- <SolidColorBrush x : Key =" YourHomeCardBackgroundColor" Color =" #f3f1ef" />
48
- </ResourceDictionary >
49
- <ResourceDictionary x : Name =" Dark" >
50
- <SolidColorBrush x : Key =" YourHomeCardBackgroundColor" Color =" Black" />
51
- </ResourceDictionary >
52
- <ResourceDictionary x : Name =" HighContrast" >
53
- <SolidColorBrush x : Key =" YourHomeCardBackgroundColor" Color =" Black" />
54
- </ResourceDictionary >
55
- </ResourceDictionary .ThemeDictionaries>
56
- </ResourceDictionary >
57
- </Grid .Resources>
58
- <Button
24
+ <Grid .Resources>
25
+ <ResourceDictionary >
26
+ <ResourceDictionary .ThemeDictionaries>
27
+ <ResourceDictionary x : Name =" Light" >
28
+ <SolidColorBrush x : Key =" YourHomeCardBackgroundColor" Color =" #f3f1ef" />
29
+ </ResourceDictionary >
30
+ <ResourceDictionary x : Name =" Dark" >
31
+ <SolidColorBrush x : Key =" YourHomeCardBackgroundColor" Color =" Black" />
32
+ </ResourceDictionary >
33
+ <ResourceDictionary x : Name =" HighContrast" >
34
+ <SolidColorBrush x : Key =" YourHomeCardBackgroundColor" Color =" Black" />
35
+ </ResourceDictionary >
36
+ </ResourceDictionary .ThemeDictionaries>
37
+ </ResourceDictionary >
38
+ </Grid .Resources>
39
+ <Button
59
40
Padding =" 0"
60
41
HorizontalAlignment =" Stretch"
61
42
VerticalAlignment =" Stretch"
68
49
Style =" {StaticResource ButtonRevealStyle}"
69
50
Tag =" {x:Bind Tag}" >
70
51
71
- <Grid
52
+ <Grid
72
53
Margin =" 8,14"
73
54
HorizontalAlignment =" Stretch"
74
55
VerticalAlignment =" Stretch"
75
56
RowSpacing =" 2" >
76
- <Grid .RowDefinitions>
77
- <RowDefinition Height =" *" />
78
- <RowDefinition Height =" Auto" />
79
- </Grid .RowDefinitions>
80
- <FontIcon
57
+ <Grid .RowDefinitions>
58
+ <RowDefinition Height =" *" />
59
+ <RowDefinition Height =" Auto" />
60
+ </Grid .RowDefinitions>
61
+ <FontIcon
81
62
Grid.Row=" 0"
82
63
HorizontalAlignment =" Stretch"
83
64
VerticalAlignment =" Stretch"
84
65
FontFamily =" {StaticResource FluentUIGlyphs}"
85
66
FontSize =" 28"
86
67
Glyph =" {x:Bind Icon}" />
87
- <TextBlock
68
+ <TextBlock
88
69
x : Name =" ItemLocationName"
89
70
Grid.Row=" 1"
90
71
HorizontalAlignment =" Stretch"
94
75
HorizontalTextAlignment =" Center"
95
76
Text =" {x:Bind Text}"
96
77
TextWrapping =" WrapWholeWords" />
97
- </Grid >
98
- </Button >
99
- </Grid >
78
+ </Grid >
79
+ </Button >
100
80
</Grid >
101
81
</DataTemplate >
102
- </controls : AdaptiveGridView .ItemTemplate>
103
- </controls : AdaptiveGridView >
82
+ </muxc : ItemsRepeater .ItemTemplate>
83
+ </muxc : ItemsRepeater >
104
84
</Grid >
105
85
</UserControl >
0 commit comments