|
1 | | -<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> |
| 1 | +<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> |
2 | 2 | <Page x:Class="SettingsControlsExperiment.Samples.SettingsExpanderSample" |
3 | 3 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:controls="using:CommunityToolkit.WinUI.Controls" |
5 | 6 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | | - xmlns:local="using:CommunityToolkit.WinUI.Controls" |
7 | 7 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
8 | 8 | xmlns:ui="using:CommunityToolkit.WinUI" |
9 | 9 | mc:Ignorable="d"> |
10 | 10 |
|
11 | | - <local:SettingsExpander x:Name="settingsCard" |
12 | | - VerticalAlignment="Top" |
13 | | - Description="The SettingsExpander has the same properties as a Card, and you can set SettingsCard as part of the Items collection." |
14 | | - Header="SettingsExpander" |
15 | | - HeaderIcon="{ui:FontIcon Glyph=}" |
16 | | - IsEnabled="{x:Bind IsCardEnabled, Mode=OneWay}" |
17 | | - IsExpanded="{x:Bind IsCardExpanded, Mode=OneWay}"> |
| 11 | + <controls:SettingsExpander x:Name="settingsCard" |
| 12 | + VerticalAlignment="Top" |
| 13 | + Description="The SettingsExpander has the same properties as a Card, and you can set SettingsCard as part of the Items collection." |
| 14 | + Header="SettingsExpander" |
| 15 | + HeaderIcon="{ui:FontIcon Glyph=}" |
| 16 | + IsEnabled="{x:Bind IsCardEnabled, Mode=OneWay}" |
| 17 | + IsExpanded="{x:Bind IsCardExpanded, Mode=OneWay}"> |
18 | 18 | <!-- TODO: This should be TwoWay bound but throws compile error in Uno. --> |
19 | 19 | <ComboBox SelectedIndex="0"> |
20 | 20 | <ComboBoxItem>Option 1</ComboBoxItem> |
21 | 21 | <ComboBoxItem>Option 2</ComboBoxItem> |
22 | 22 | <ComboBoxItem>Option 3</ComboBoxItem> |
23 | 23 | </ComboBox> |
24 | 24 |
|
25 | | - <local:SettingsExpander.Items> |
26 | | - <local:SettingsCard Header="A basic SettingsCard within an SettingsExpander"> |
| 25 | + <controls:SettingsExpander.Items> |
| 26 | + <controls:SettingsCard Header="A basic SettingsCard within an SettingsExpander"> |
27 | 27 | <Button Content="Button" /> |
28 | | - </local:SettingsCard> |
29 | | - <local:SettingsCard Description="SettingsCard within an Expander can be made clickable too!" |
30 | | - Header="This item can be clicked" |
31 | | - IsClickEnabled="True" /> |
| 28 | + </controls:SettingsCard> |
| 29 | + <controls:SettingsCard Description="SettingsCard within an Expander can be made clickable too!" |
| 30 | + Header="This item can be clicked" |
| 31 | + IsClickEnabled="True" /> |
32 | 32 |
|
33 | | - <local:SettingsCard ContentAlignment="Left"> |
| 33 | + <controls:SettingsCard ContentAlignment="Left"> |
34 | 34 | <CheckBox Content="Here the ContentAlignment is set to Left. This is great for e.g. CheckBoxes or RadioButtons." /> |
35 | | - </local:SettingsCard> |
| 35 | + </controls:SettingsCard> |
36 | 36 |
|
37 | | - <local:SettingsCard HorizontalContentAlignment="Left" |
38 | | - ContentAlignment="Vertical" |
39 | | - Description="You can also align your content vertically. Make sure to set the HorizontalAlignment to Left when you do!" |
40 | | - Header="Vertically aligned"> |
| 37 | + <controls:SettingsCard HorizontalContentAlignment="Left" |
| 38 | + ContentAlignment="Vertical" |
| 39 | + Description="You can also align your content vertically. Make sure to set the HorizontalAlignment to Left when you do!" |
| 40 | + Header="Vertically aligned"> |
41 | 41 | <GridView SelectedIndex="1"> |
42 | 42 | <GridViewItem> |
43 | 43 | <Border Width="64" |
|
64 | 64 | CornerRadius="4" /> |
65 | 65 | </GridViewItem> |
66 | 66 | </GridView> |
67 | | - </local:SettingsCard> |
68 | | - <local:SettingsCard Description="You can override the Left indention of a SettingsCard by overriding the SettingsCardLeftIndention" |
69 | | - Header="Customization"> |
70 | | - <local:SettingsCard.Resources> |
| 67 | + </controls:SettingsCard> |
| 68 | + <controls:SettingsCard Description="You can override the Left indention of a SettingsCard by overriding the SettingsCardLeftIndention" |
| 69 | + Header="Customization"> |
| 70 | + <controls:SettingsCard.Resources> |
71 | 71 | <x:Double x:Key="SettingsCardLeftIndention">40</x:Double> |
72 | | - </local:SettingsCard.Resources> |
73 | | - </local:SettingsCard> |
74 | | - </local:SettingsExpander.Items> |
75 | | - </local:SettingsExpander> |
| 72 | + </controls:SettingsCard.Resources> |
| 73 | + </controls:SettingsCard> |
| 74 | + </controls:SettingsExpander.Items> |
| 75 | + </controls:SettingsExpander> |
76 | 76 | </Page> |
0 commit comments