|
9 | 9 | xmlns:muxc="using:Microsoft.UI.Xaml.Controls" |
10 | 10 | mc:Ignorable="d"> |
11 | 11 |
|
12 | | - <labs:SettingsExpander Description="The SettingsExpander can use ItemsSource to define its Items." |
13 | | - Header="Settings Expander with ItemsSource" |
14 | | - ItemsSource="{x:Bind MyDataSet}"> |
15 | | - <labs:SettingsExpander.HeaderIcon> |
16 | | - <FontIcon Glyph="" /> |
17 | | - </labs:SettingsExpander.HeaderIcon> |
18 | | - <labs:SettingsExpander.ItemTemplate> |
19 | | - <DataTemplate x:DataType="local:MyDataModel"> |
20 | | - <labs:SettingsCard Description="{x:Bind Info}" |
21 | | - Header="{x:Bind Name}"> |
22 | | - <HyperlinkButton Content="{x:Bind LinkDescription}" |
23 | | - NavigateUri="{x:Bind Url}" /> |
24 | | - </labs:SettingsCard> |
25 | | - </DataTemplate> |
26 | | - </labs:SettingsExpander.ItemTemplate> |
27 | | - <labs:SettingsExpander.ItemsHeader> |
28 | | - <muxc:InfoBar Title="This is the ItemsHeader" |
29 | | - BorderThickness="0" |
30 | | - CornerRadius="0" |
31 | | - IsIconVisible="False" |
32 | | - IsOpen="True" |
33 | | - Severity="Success"> |
34 | | - <muxc:InfoBar.ActionButton> |
35 | | - <HyperlinkButton Content="It can host custom content" /> |
36 | | - </muxc:InfoBar.ActionButton> |
37 | | - </muxc:InfoBar> |
38 | | - </labs:SettingsExpander.ItemsHeader> |
39 | | - <labs:SettingsExpander.ItemsFooter> |
40 | | - <muxc:InfoBar Title="This is the ItemsFooter" |
41 | | - BorderThickness="0" |
42 | | - CornerRadius="0,0,4,4" |
43 | | - IsIconVisible="False" |
44 | | - IsOpen="True" |
45 | | - Severity="Informational"> |
46 | | - <muxc:InfoBar.ActionButton> |
47 | | - <HyperlinkButton Content="It can host custom content" /> |
48 | | - </muxc:InfoBar.ActionButton> |
49 | | - </muxc:InfoBar> |
50 | | - </labs:SettingsExpander.ItemsFooter> |
51 | | - </labs:SettingsExpander> |
| 12 | + <StackPanel Spacing="3"> |
| 13 | + <labs:SettingsExpander Description="The SettingsExpander can use ItemsSource to define its Items." |
| 14 | + Header="Settings Expander with ItemsSource" |
| 15 | + ItemsSource="{x:Bind MyDataSet}"> |
| 16 | + <labs:SettingsExpander.HeaderIcon> |
| 17 | + <FontIcon Glyph="" /> |
| 18 | + </labs:SettingsExpander.HeaderIcon> |
| 19 | + <labs:SettingsExpander.ItemTemplate> |
| 20 | + <DataTemplate x:DataType="local:MyDataModel"> |
| 21 | + <labs:SettingsCard Description="{x:Bind Info}" |
| 22 | + Header="{x:Bind Name}"> |
| 23 | + <HyperlinkButton Content="{x:Bind LinkDescription}" |
| 24 | + NavigateUri="{x:Bind Url}" /> |
| 25 | + </labs:SettingsCard> |
| 26 | + </DataTemplate> |
| 27 | + </labs:SettingsExpander.ItemTemplate> |
| 28 | + <labs:SettingsExpander.ItemsHeader> |
| 29 | + <muxc:InfoBar Title="This is the ItemsHeader" |
| 30 | + BorderThickness="0" |
| 31 | + CornerRadius="0" |
| 32 | + IsIconVisible="False" |
| 33 | + IsOpen="True" |
| 34 | + Severity="Success"> |
| 35 | + <muxc:InfoBar.ActionButton> |
| 36 | + <HyperlinkButton Content="It can host custom content" /> |
| 37 | + </muxc:InfoBar.ActionButton> |
| 38 | + </muxc:InfoBar> |
| 39 | + </labs:SettingsExpander.ItemsHeader> |
| 40 | + <labs:SettingsExpander.ItemsFooter> |
| 41 | + <muxc:InfoBar Title="This is the ItemsFooter" |
| 42 | + BorderThickness="0" |
| 43 | + CornerRadius="0,0,4,4" |
| 44 | + IsIconVisible="False" |
| 45 | + IsOpen="True" |
| 46 | + Severity="Informational"> |
| 47 | + <muxc:InfoBar.ActionButton> |
| 48 | + <HyperlinkButton Content="It can host custom content" /> |
| 49 | + </muxc:InfoBar.ActionButton> |
| 50 | + </muxc:InfoBar> |
| 51 | + </labs:SettingsExpander.ItemsFooter> |
| 52 | + </labs:SettingsExpander> |
| 53 | + |
| 54 | + <labs:SettingsExpander Description="SettingsExpander can use a DataTemplate, DataTemplateSelector, or IElementFactory for its ItemTemplate." |
| 55 | + Header="Settings Expander with a custom ItemTemplate" |
| 56 | + ItemsSource="{x:Bind MyDataSet}"> |
| 57 | + <labs:SettingsExpander.HeaderIcon> |
| 58 | + <FontIcon Glyph="" /> |
| 59 | + </labs:SettingsExpander.HeaderIcon> |
| 60 | + <labs:SettingsExpander.ItemTemplate> |
| 61 | + <local:MyDataModelTemplateSelector> |
| 62 | + <local:MyDataModelTemplateSelector.ButtonTemplate> |
| 63 | + <DataTemplate x:DataType="local:MyDataModel"> |
| 64 | + <labs:SettingsCard Description="{x:Bind ItemType}" |
| 65 | + Header="{x:Bind Name}"> |
| 66 | + <Button Click="Button_Click" |
| 67 | + Content="{x:Bind LinkDescription}" /> |
| 68 | + </labs:SettingsCard> |
| 69 | + </DataTemplate> |
| 70 | + </local:MyDataModelTemplateSelector.ButtonTemplate> |
| 71 | + |
| 72 | + <local:MyDataModelTemplateSelector.LinkButtonTemplate> |
| 73 | + <DataTemplate x:DataType="local:MyDataModel"> |
| 74 | + <labs:SettingsCard Description="{x:Bind ItemType}" |
| 75 | + Header="{x:Bind Name}"> |
| 76 | + <HyperlinkButton Content="{x:Bind LinkDescription}" |
| 77 | + NavigateUri="{x:Bind Url}" /> |
| 78 | + </labs:SettingsCard> |
| 79 | + </DataTemplate> |
| 80 | + </local:MyDataModelTemplateSelector.LinkButtonTemplate> |
| 81 | + |
| 82 | + <local:MyDataModelTemplateSelector.NoButtonTemplate> |
| 83 | + <DataTemplate x:DataType="local:MyDataModel"> |
| 84 | + <labs:SettingsCard Description="{x:Bind ItemType}" |
| 85 | + Header="{x:Bind Name}" /> |
| 86 | + </DataTemplate> |
| 87 | + </local:MyDataModelTemplateSelector.NoButtonTemplate> |
| 88 | + </local:MyDataModelTemplateSelector> |
| 89 | + </labs:SettingsExpander.ItemTemplate> |
| 90 | + </labs:SettingsExpander> |
| 91 | + </StackPanel> |
52 | 92 | </Page> |
0 commit comments