|
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.SettingsPageExample" |
3 | 3 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
23 | 23 | </Style> |
24 | 24 | </Page.Resources> |
25 | 25 | <ScrollViewer> |
26 | | - <StackPanel MaxWidth="1000" |
27 | | - HorizontalAlignment="Stretch" |
28 | | - Spacing="{StaticResource SettingsCardSpacing}"> |
29 | | - <win:StackPanel.ChildrenTransitions> |
30 | | - <win:EntranceThemeTransition FromVerticalOffset="50" /> |
31 | | - <win:RepositionThemeTransition IsStaggeringEnabled="False" /> |
32 | | - </win:StackPanel.ChildrenTransitions> |
33 | | - <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" |
34 | | - Text="Section 1" /> |
35 | | - <labs:SettingsCard Description="This is a default card, with the Header, HeaderIcon, Description and Content set" |
36 | | - Header="This is the Header"> |
37 | | - <labs:SettingsCard.HeaderIcon> |
38 | | - <FontIcon Glyph="" /> |
39 | | - </labs:SettingsCard.HeaderIcon> |
40 | | - <ToggleSwitch IsOn="True" /> |
41 | | - </labs:SettingsCard> |
| 26 | + <Grid> |
| 27 | + <StackPanel MaxWidth="1000" |
| 28 | + HorizontalAlignment="Stretch" |
| 29 | + Spacing="{StaticResource SettingsCardSpacing}"> |
| 30 | + <win:StackPanel.ChildrenTransitions> |
| 31 | + <win:EntranceThemeTransition FromVerticalOffset="50" /> |
| 32 | + <win:RepositionThemeTransition IsStaggeringEnabled="False" /> |
| 33 | + </win:StackPanel.ChildrenTransitions> |
| 34 | + <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" |
| 35 | + Text="Section 1" /> |
| 36 | + <labs:SettingsCard Description="This is a default card, with the Header, HeaderIcon, Description and Content set" |
| 37 | + Header="This is the Header"> |
| 38 | + <labs:SettingsCard.HeaderIcon> |
| 39 | + <FontIcon Glyph="" /> |
| 40 | + </labs:SettingsCard.HeaderIcon> |
| 41 | + <ToggleSwitch IsOn="True" /> |
| 42 | + </labs:SettingsCard> |
42 | 43 |
|
43 | | - <labs:SettingsExpander Description="The SettingsExpander has the same properties as a SettingsCard" |
44 | | - Header="SettingsExpander"> |
45 | | - <labs:SettingsExpander.HeaderIcon> |
46 | | - <FontIcon Glyph="" /> |
47 | | - </labs:SettingsExpander.HeaderIcon> |
48 | | - <Button Content="Content" |
49 | | - Style="{StaticResource AccentButtonStyle}" /> |
| 44 | + <labs:SettingsExpander Description="The SettingsExpander has the same properties as a SettingsCard" |
| 45 | + Header="SettingsExpander"> |
| 46 | + <labs:SettingsExpander.HeaderIcon> |
| 47 | + <FontIcon Glyph="" /> |
| 48 | + </labs:SettingsExpander.HeaderIcon> |
| 49 | + <Button Content="Content" |
| 50 | + Style="{StaticResource AccentButtonStyle}" /> |
50 | 51 |
|
51 | | - <labs:SettingsExpander.Items> |
52 | | - <labs:SettingsCard Header="A basic SettingsCard within an SettingsExpander"> |
53 | | - <Button Content="Button" /> |
54 | | - </labs:SettingsCard> |
55 | | - <labs:SettingsCard Description="SettingsCard within an Expander can be made clickable too!" |
56 | | - Header="This item can be clicked" |
57 | | - IsClickEnabled="True" /> |
| 52 | + <labs:SettingsExpander.Items> |
| 53 | + <labs:SettingsCard Header="A basic SettingsCard within an SettingsExpander"> |
| 54 | + <Button Content="Button" /> |
| 55 | + </labs:SettingsCard> |
| 56 | + <labs:SettingsCard Description="SettingsCard within an Expander can be made clickable too!" |
| 57 | + Header="This item can be clicked" |
| 58 | + IsClickEnabled="True" /> |
58 | 59 |
|
59 | | - <labs:SettingsCard ContentAlignment="Left"> |
60 | | - <CheckBox Content="Here the ContentAlignment is set to Left. This is great for e.g. CheckBoxes or RadioButtons" /> |
61 | | - </labs:SettingsCard> |
62 | | - </labs:SettingsExpander.Items> |
63 | | - </labs:SettingsExpander> |
| 60 | + <labs:SettingsCard ContentAlignment="Left"> |
| 61 | + <CheckBox Content="Here the ContentAlignment is set to Left. This is great for e.g. CheckBoxes or RadioButtons" /> |
| 62 | + </labs:SettingsCard> |
| 63 | + </labs:SettingsExpander.Items> |
| 64 | + </labs:SettingsExpander> |
64 | 65 |
|
65 | | - <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" |
66 | | - Text="Section 2" /> |
67 | | - <labs:SettingsCard Description="Another card to show grouping of cards" |
68 | | - Header="Another SettingsCard"> |
69 | | - <labs:SettingsCard.HeaderIcon> |
70 | | - <FontIcon Glyph="" /> |
71 | | - </labs:SettingsCard.HeaderIcon> |
72 | | - <ComboBox SelectedIndex="0"> |
73 | | - <ComboBoxItem>Option 1</ComboBoxItem> |
74 | | - <ComboBoxItem>Option 2</ComboBoxItem> |
75 | | - <ComboBoxItem>Option 3</ComboBoxItem> |
76 | | - </ComboBox> |
77 | | - </labs:SettingsCard> |
| 66 | + <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" |
| 67 | + Text="Section 2" /> |
| 68 | + <labs:SettingsCard Description="Another card to show grouping of cards" |
| 69 | + Header="Another SettingsCard"> |
| 70 | + <labs:SettingsCard.HeaderIcon> |
| 71 | + <FontIcon Glyph="" /> |
| 72 | + </labs:SettingsCard.HeaderIcon> |
| 73 | + <ComboBox SelectedIndex="0"> |
| 74 | + <ComboBoxItem>Option 1</ComboBoxItem> |
| 75 | + <ComboBoxItem>Option 2</ComboBoxItem> |
| 76 | + <ComboBoxItem>Option 3</ComboBoxItem> |
| 77 | + </ComboBox> |
| 78 | + </labs:SettingsCard> |
78 | 79 |
|
79 | | - <labs:SettingsCard Description="Another card to show grouping of cards" |
80 | | - Header="Yet another SettingsCard"> |
81 | | - <labs:SettingsCard.HeaderIcon> |
82 | | - <FontIcon Glyph="" /> |
83 | | - </labs:SettingsCard.HeaderIcon> |
84 | | - <Button Content="Content" /> |
85 | | - </labs:SettingsCard> |
| 80 | + <labs:SettingsCard Description="Another card to show grouping of cards" |
| 81 | + Header="Yet another SettingsCard"> |
| 82 | + <labs:SettingsCard.HeaderIcon> |
| 83 | + <FontIcon Glyph="" /> |
| 84 | + </labs:SettingsCard.HeaderIcon> |
| 85 | + <Button Content="Content" /> |
| 86 | + </labs:SettingsCard> |
86 | 87 |
|
87 | | - <!-- Example 'About' section --> |
88 | | - <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" |
89 | | - Text="About" /> |
| 88 | + <!-- Example 'About' section --> |
| 89 | + <TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}" |
| 90 | + Text="About" /> |
90 | 91 |
|
91 | | - <labs:SettingsExpander Description="© 2023. All rights reserved." |
92 | | - Header="Community Toolkit Gallery"> |
93 | | - <labs:SettingsExpander.HeaderIcon> |
94 | | - <BitmapIcon ShowAsMonochrome="False" |
95 | | - UriSource="ms-appx:///Assets/AppTitleBar.scale-200.png" /> |
96 | | - </labs:SettingsExpander.HeaderIcon> |
97 | | - <TextBlock win:IsTextSelectionEnabled="True" |
98 | | - Foreground="{ThemeResource TextFillColorSecondaryBrush}" |
99 | | - Style="{StaticResource CaptionTextBlockStyle}" |
100 | | - Text="Version 1.0.0.0" /> |
101 | | - <labs:SettingsExpander.Items> |
102 | | - <labs:SettingsCard HorizontalContentAlignment="Left" |
103 | | - ContentAlignment="Left"> |
104 | | - <StackPanel Margin="-12,0,0,0" |
105 | | - Orientation="Vertical"> |
106 | | - <HyperlinkButton Content="Link 1" /> |
107 | | - <HyperlinkButton Content="Link 2" /> |
108 | | - <HyperlinkButton Content="Link 3" /> |
109 | | - </StackPanel> |
110 | | - </labs:SettingsCard> |
111 | | - </labs:SettingsExpander.Items> |
112 | | - </labs:SettingsExpander> |
113 | | - <HyperlinkButton Margin="0,8,0,0" |
114 | | - Content="Send feedback" /> |
115 | | - </StackPanel> |
| 92 | + <labs:SettingsExpander Description="© 2023. All rights reserved." |
| 93 | + Header="Community Toolkit Gallery"> |
| 94 | + <labs:SettingsExpander.HeaderIcon> |
| 95 | + <BitmapIcon ShowAsMonochrome="False" |
| 96 | + UriSource="ms-appx:///Assets/AppTitleBar.scale-200.png" /> |
| 97 | + </labs:SettingsExpander.HeaderIcon> |
| 98 | + <TextBlock win:IsTextSelectionEnabled="True" |
| 99 | + Foreground="{ThemeResource TextFillColorSecondaryBrush}" |
| 100 | + Style="{StaticResource CaptionTextBlockStyle}" |
| 101 | + Text="Version 1.0.0.0" /> |
| 102 | + <labs:SettingsExpander.Items> |
| 103 | + <labs:SettingsCard HorizontalContentAlignment="Left" |
| 104 | + ContentAlignment="Left"> |
| 105 | + <StackPanel Margin="-12,0,0,0" |
| 106 | + Orientation="Vertical"> |
| 107 | + <HyperlinkButton Content="Link 1" /> |
| 108 | + <HyperlinkButton Content="Link 2" /> |
| 109 | + <HyperlinkButton Content="Link 3" /> |
| 110 | + </StackPanel> |
| 111 | + </labs:SettingsCard> |
| 112 | + </labs:SettingsExpander.Items> |
| 113 | + </labs:SettingsExpander> |
| 114 | + <HyperlinkButton Margin="0,8,0,0" |
| 115 | + Content="Send feedback" /> |
| 116 | + </StackPanel> |
| 117 | + </Grid> |
116 | 118 | </ScrollViewer> |
117 | 119 | </Page> |
0 commit comments