forked from microsoft/microsoft-ui-xaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPage.xaml
85 lines (78 loc) · 4.05 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
80
81
82
83
84
85
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Page
x:Class="MUXControlsTestApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MUXControlsTestApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
AutomationProperties.AutomationId="MainPage">
<Page.Resources>
<local:NavigateToTestCommand x:Key="NavigateToTestCommand" Frame="{x:Bind Frame}"/>
</Page.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="0">
</StackPanel>
<ScrollViewer Grid.Row="1" HorizontalAlignment="Center" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
<ItemsControl ItemsSource="{x:Bind Tests}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<ItemsWrapGrid Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button
CommandParameter="{Binding}"
Command="{StaticResource NavigateToTestCommand}"
AutomationProperties.Name="{Binding AutomationName}"
FontSize="20"
Margin="0,0,12,12"
VerticalAlignment="Stretch">
<Grid Width="250">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="36"/>
<ColumnDefinition Width="12"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image
Grid.Column="0"
Source="{Binding Icon}"/>
<TextBlock
Grid.Column="2"
Text="{Binding Name}"/>
</Grid>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center">
<CheckBox x:Name="LongAnimationsDisabled" AutomationProperties.AutomationId="LongAnimationsDisabled" Content="Long Animations Disabled" Checked="LongAnimationsDisabled_Checked" Unchecked="LongAnimationsDisabled_Unchecked" Margin="10,0,0,0"/>
<ComboBox
x:Name="LanguageChooser"
Header="Languages"
AutomationProperties.AutomationId="LanguageChooser"
VerticalAlignment="Center"
SelectionChanged="LanguageChooser_SelectionChanged"/>
<ComboBox
x:Name="FlowDirectionChooser"
Header="FlowDirection"
AutomationProperties.AutomationId="FlowDirectionChooser"
VerticalAlignment="Center"
SelectionChanged="FlowDirectionChooser_SelectionChanged"/>
<ComboBox
x:Name="AppHighContrastAdjustmentChooser"
VerticalAlignment="Center"
AutomationProperties.AutomationId="AppHighContrastAdjustmentChooser"
Header="ApplicationHighContrastAdjustment"
SelectionChanged="AppHighContrastAdjustmentChooser_SelectionChanged" />
</StackPanel>
</Grid>
</Page>