1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <ContentPage xmlns =" http://schemas.microsoft.com/dotnet/2021/maui"
3+ xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4+ xmlns : local =" clr-namespace:Maui.Controls.Sample"
5+ x : Class =" Maui.Controls.Sample.SwitchOptionsPage"
6+ x : DataType =" local:SwitchViewModel"
7+ Title =" SwitchOptionsPage" >
8+ <ContentPage .ToolbarItems>
9+ <ToolbarItem Text =" Apply"
10+ Clicked =" ApplyButton_Clicked"
11+ AutomationId =" Apply" />
12+ </ContentPage .ToolbarItems>
13+
14+ <Grid ColumnSpacing =" 10"
15+ RowSpacing =" 10"
16+ RowDefinitions =" Auto,Auto,Auto,Auto,Auto,Auto,Auto"
17+ ColumnDefinitions =" Auto,Auto"
18+ HorizontalOptions =" Center"
19+ VerticalOptions =" Center" >
20+
21+ <!-- FlowDirection -->
22+ <Label Grid.Row=" 0"
23+ Grid.Column=" 0"
24+ Text =" FlowDirection:"
25+ VerticalOptions =" Center" />
26+ <StackLayout Grid.Row=" 0"
27+ Grid.Column=" 1"
28+ Orientation =" Horizontal"
29+ Spacing =" 5"
30+ VerticalOptions =" Center" >
31+ <CheckBox x : Name =" FlowDirectionLeftToRightCheckBox"
32+ AutomationId =" FlowDirectionLeftToRightCheckBox"
33+ IsChecked =" True"
34+ CheckedChanged =" OnFlowDirectionCheckBoxCheckedChanged" />
35+ <Label Text =" LeftToRight"
36+ VerticalOptions =" Center" />
37+ <CheckBox x : Name =" FlowDirectionRightToLeftCheckBox"
38+ AutomationId =" FlowDirectionRightToLeftCheckBox"
39+ CheckedChanged =" OnFlowDirectionCheckBoxCheckedChanged" />
40+ <Label Text =" RightToLeft"
41+ VerticalOptions =" Center" />
42+ </StackLayout >
43+
44+ <!-- IsEnabled -->
45+ <Label Grid.Row=" 1"
46+ Grid.Column=" 0"
47+ Text =" IsEnabled:"
48+ VerticalOptions =" Center" />
49+ <StackLayout Grid.Row=" 1"
50+ Grid.Column=" 1"
51+ Orientation =" Horizontal"
52+ Spacing =" 10"
53+ VerticalOptions =" Center" >
54+ <CheckBox AutomationId =" IsEnabledFalseCheckBox"
55+ CheckedChanged =" OnEnabledCheckBoxCheckedChanged" />
56+ </StackLayout >
57+
58+ <!-- IsVisible -->
59+ <Label Grid.Row=" 2"
60+ Grid.Column=" 0"
61+ Text =" IsVisible:"
62+ VerticalOptions =" Center" />
63+ <StackLayout Grid.Row=" 2"
64+ Grid.Column=" 1"
65+ Orientation =" Horizontal"
66+ Spacing =" 10"
67+ VerticalOptions =" Center" >
68+ <CheckBox AutomationId =" IsVisibleFalseCheckBox"
69+ CheckedChanged =" OnVisibleCheckBoxCheckedChanged" />
70+ </StackLayout >
71+
72+ <!-- IsToggled -->
73+ <Label Grid.Row=" 3"
74+ Grid.Column=" 0"
75+ Text =" IsToggled:"
76+ VerticalOptions =" Center" />
77+ <StackLayout Grid.Row=" 3"
78+ Grid.Column=" 1"
79+ Orientation =" Horizontal"
80+ Spacing =" 10"
81+ VerticalOptions =" Center" >
82+ <CheckBox AutomationId =" IsToggledTrueCheckBox"
83+ CheckedChanged =" OnToggledCheckBoxCheckedChanged" />
84+ </StackLayout >
85+
86+ <!-- OnColor -->
87+ <Label Grid.Row=" 4"
88+ Grid.Column=" 0"
89+ Text =" OnColor:"
90+ VerticalOptions =" Center" />
91+ <StackLayout Grid.Row=" 4"
92+ Grid.Column=" 1"
93+ Orientation =" Horizontal"
94+ Spacing =" 5"
95+ VerticalOptions =" Center" >
96+ <CheckBox x : Name =" OnColorRedCheckBox"
97+ AutomationId =" OnColorRedCheckBox"
98+ CheckedChanged =" OnOnColorCheckBoxCheckedChanged" />
99+ <Label Text =" Red"
100+ VerticalOptions =" Center" />
101+ <CheckBox x : Name =" OnColorGreenCheckBox"
102+ AutomationId =" OnColorGreenCheckBox"
103+ CheckedChanged =" OnOnColorCheckBoxCheckedChanged" />
104+ <Label Text =" Green"
105+ VerticalOptions =" Center" />
106+ </StackLayout >
107+
108+ <!-- Shadow -->
109+ <Label Grid.Row=" 5"
110+ Grid.Column=" 0"
111+ Text =" Shadow:"
112+ VerticalOptions =" Center" />
113+ <HorizontalStackLayout Grid.Row=" 5"
114+ Grid.Column=" 1"
115+ VerticalOptions =" Center" >
116+ <CheckBox AutomationId =" ShadowTrueCheckBox"
117+ CheckedChanged =" OnShadowCheckBoxCheckedChanged" />
118+ </HorizontalStackLayout >
119+
120+ <!-- ThumbColor -->
121+ <Label Grid.Row=" 6"
122+ Grid.Column=" 0"
123+ Text =" ThumbColor:"
124+ VerticalOptions =" Center" />
125+ <StackLayout Grid.Row=" 6"
126+ Grid.Column=" 1"
127+ Orientation =" Horizontal"
128+ Spacing =" 5"
129+ VerticalOptions =" Center" >
130+ <CheckBox x : Name =" ThumbColorRedCheckBox"
131+ AutomationId =" ThumbColorRedCheckBox"
132+ CheckedChanged =" OnThumbColorCheckBoxCheckedChanged" />
133+ <Label Text =" Red"
134+ VerticalOptions =" Center" />
135+ <CheckBox x : Name =" ThumbColorGreenCheckBox"
136+ AutomationId =" ThumbColorGreenCheckBox"
137+ CheckedChanged =" OnThumbColorCheckBoxCheckedChanged" />
138+ <Label Text =" Green"
139+ VerticalOptions =" Center" />
140+ </StackLayout >
141+ </Grid >
142+ </ContentPage >
0 commit comments