-
Notifications
You must be signed in to change notification settings - Fork 150
Expand file tree
/
Copy pathHeaderedItemsControlSample.xaml
More file actions
44 lines (42 loc) · 2.21 KB
/
HeaderedItemsControlSample.xaml
File metadata and controls
44 lines (42 loc) · 2.21 KB
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
<!-- 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. -->
<Page x:Class="HeaderedControlsExperiment.Samples.HeaderedItemsControlSample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:HeaderedControlsExperiment.Samples"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<controls:HeaderedItemsControl Footer="Plain text footer"
Header="Default header and footer"
ItemsSource="{x:Bind Items, Mode=OneWay}" />
<controls:HeaderedItemsControl Grid.Column="1"
Footer="Styled footer"
Header="Templated header and footer"
ItemsSource="{x:Bind Items, Mode=OneWay}">
<controls:HeaderedItemsControl.HeaderTemplate>
<DataTemplate>
<TextBlock FontWeight="SemiBold"
Text="{Binding}" />
</DataTemplate>
</controls:HeaderedItemsControl.HeaderTemplate>
<controls:HeaderedItemsControl.FooterTemplate>
<DataTemplate>
<TextBlock FontWeight="SemiBold"
Text="{Binding}" />
</DataTemplate>
</controls:HeaderedItemsControl.FooterTemplate>
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Text="{Binding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</controls:HeaderedItemsControl>
</Grid>
</Page>