6
6
xmlns : interactivity =" using:Microsoft.Xaml.Interactivity"
7
7
xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
8
8
xmlns : view =" using:Aldeo.View"
9
+ xmlns : controls =" using:Microsoft.Toolkit.Uwp.UI.Controls"
9
10
DataContext =" {Binding Main, Source={StaticResource Locator}}"
10
11
mc : Ignorable =" d" >
11
12
13
+ <Page .Resources>
14
+ <DataTemplate x : Key =" MenuTemplate" >
15
+ <Grid VerticalAlignment =" Stretch" >
16
+ <view : MenuTile Margin =" 5" />
17
+ </Grid >
18
+ </DataTemplate >
19
+ </Page .Resources>
20
+
12
21
<interactivity : Interaction .Behaviors>
13
22
<core : EventTriggerBehavior EventName =" Loaded" >
14
23
<core : InvokeCommandAction Command =" {Binding LoadedCommand}" />
24
33
<!-- <TextBlock FontSize="50" Text="{Binding Message}" />-->
25
34
<view : Header Title =" Aldeo" />
26
35
27
- <GridView x : Name =" MenuView"
36
+
37
+ <!-- ItemHeight="{Binding ItemHeight.Value}"-->
38
+ <!-- DesiredWidth="{Binding DesiredWidth.Value}"-->
39
+ <!-- SelectionMode="{Binding SelectionMode.Value,Mode=TwoWay}"-->
40
+
41
+ <controls : AdaptiveGridView
42
+ Grid.Row=" 1"
43
+ x : Name =" MenuView"
44
+ IsItemClickEnabled =" True"
45
+ ItemTemplate =" {StaticResource MenuTemplate}"
46
+ ItemsSource =" {Binding Menu}" >
47
+ <interactivity : Interaction .Behaviors>
48
+ <core : EventTriggerBehavior EventName =" SelectionChanged" >
49
+ <core : InvokeCommandAction Command =" {Binding ChangedSelection}" CommandParameter =" {Binding SelectedItem, ElementName=MenuView}" />
50
+ </core : EventTriggerBehavior >
51
+ </interactivity : Interaction .Behaviors>
52
+ </controls : AdaptiveGridView >
53
+
54
+ <!-- <GridView x:Name="MenuView"
28
55
Grid.Row="1"
29
56
Margin="15"
30
57
HorizontalContentAlignment="Stretch"
33
60
ItemsSource="{Binding Menu}">
34
61
35
62
36
- <GridView .ItemTemplate>
37
- <DataTemplate >
38
- <Grid VerticalAlignment =" Stretch" >
39
- <view : MenuTile Margin =" 5" />
63
+ <GridView.ItemTemplate>
64
+ <DataTemplate>
65
+ <Grid VerticalAlignment="Stretch">
66
+ <view:MenuTile Margin="5" />
67
+ </Grid>
68
+ </DataTemplate>
69
+ </GridView.ItemTemplate>-->
40
70
41
- </Grid >
42
- </DataTemplate >
43
- </GridView .ItemTemplate>
44
71
45
- <interactivity : Interaction .Behaviors>
46
- <core : EventTriggerBehavior EventName =" SelectionChanged" >
47
- <core : InvokeCommandAction Command =" {Binding ChangedSelection}" CommandParameter =" {Binding SelectedItem, ElementName=MenuView}" />
48
- </core : EventTriggerBehavior >
49
- </interactivity : Interaction .Behaviors>
50
72
51
- <!-- <GridView.ItemsPanel>
73
+ <!-- <GridView.ItemsPanel>
52
74
<ItemsPanelTemplate>
53
75
<WrapGrid Orientation="Horizontal" VerticalChildrenAlignment="Stretch"/>
54
76
</ItemsPanelTemplate>-->
55
77
56
- <!-- <GridView.ItemsPanel>
78
+ <!-- <GridView.ItemsPanel>
57
79
58
80
<ItemsPanelTemplate>
59
81
<WrapGrid />
60
82
-->
61
- <!-- Orientation="Horizontal"/> -->
83
+ <!-- Orientation="Horizontal"/> -->
62
84
63
- <!-- </ItemsPanelTemplate>-->
85
+ <!-- </ItemsPanelTemplate>-->
64
86
65
- <!-- </GridView.ItemsPanel>-->
87
+ <!-- </GridView.ItemsPanel>-->
66
88
67
- <!-- <StackPanel x:Name="myPanel" Orientation="Vertical">
89
+ <!-- <StackPanel x:Name="myPanel" Orientation="Vertical">
68
90
<TextBlock Text="This is a block of text. It is text block 1. "
69
91
Style="{ThemeResource BodyTextBlockStyle}"/>
70
92
<TextBlock Text="This is a block of text. It is text block 2. "
73
95
Style="{ThemeResource BodyTextBlockStyle}"/>
74
96
</StackPanel>-->
75
97
76
- </GridView >
98
+ <!-- < /GridView> -- >
77
99
<CommandBar Grid.Row=" 1" VerticalAlignment =" Bottom" >
78
100
<!-- <AppBarToggleButton Icon="Shuffle" Label="Shuffle" Click="AppBarButton_Click" />
79
101
<AppBarToggleButton Icon="RepeatAll" Label="Repeat" Click="AppBarButton_Click"/>
116
138
</VisualState>
117
139
</VisualStateGroup>
118
140
</VisualStateManager.VisualStateGroups>-->
119
- <view : Bot Grid.Row=" 2" HorizontalAlignment =" Stretch" MaxWidth =" 720" VerticalAlignment =" Bottom" >
120
-
121
- </view : Bot >
122
-
141
+ <view : Bot Grid.Row=" 2" HorizontalAlignment =" Stretch" MaxWidth =" 720" VerticalAlignment =" Bottom" >
142
+
143
+ </view : Bot >
144
+
123
145
</Grid >
124
146
125
147
</Page >
0 commit comments