-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sample for ListViewExtensions.AlternateColor property
- Loading branch information
1 parent
d36adbe
commit 4fc769e
Showing
3 changed files
with
39 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
components/Extensions/samples/ListViewExtensionsAlternateColorSample.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Page x:Class="ExtensionsExperiment.Samples.ListViewExtensionsAlternateColorSample" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:ui="using:CommunityToolkit.WinUI" | ||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
|
||
<ListView ui:ListViewExtensions.AlternateColor="Silver"> | ||
<ListView.Items> | ||
<x:String>One</x:String> | ||
<x:String>Two</x:String> | ||
<x:String>Three</x:String> | ||
<x:String>Four</x:String> | ||
<x:String>Five</x:String> | ||
<x:String>Six</x:String> | ||
<x:String>Seven</x:String> | ||
<x:String>Eight</x:String> | ||
<x:String>Nine</x:String> | ||
<x:String>Ten</x:String> | ||
</ListView.Items> | ||
</ListView> | ||
</Page> |
17 changes: 17 additions & 0 deletions
17
components/Extensions/samples/ListViewExtensionsAlternateColorSample.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// 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. | ||
|
||
namespace ExtensionsExperiment.Samples; | ||
|
||
/// <summary> | ||
/// An empty page that can be used on its own or navigated to within a Frame. | ||
/// </summary> | ||
[ToolkitSample(id: nameof(ListViewExtensionsAlternateColorSample), nameof(ListViewExtensionsAlternateColorSample), description: $"A sample for showing how to use the ListViewExtensions.AlternateColor attached property.")] | ||
public sealed partial class ListViewExtensionsAlternateColorSample : Page | ||
{ | ||
public ListViewExtensionsAlternateColorSample() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} |