-
Notifications
You must be signed in to change notification settings - Fork 127
[Extensions] AlternateStyle property #768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Avid29
wants to merge
14
commits into
CommunityToolkit:main
Choose a base branch
from
Avid29:alt-style
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2954509
Added item fallback if container is null in ListViewExtensions altern…
Avid29 da3ce4f
Rewrote without null conditional assignment
Avid29 f19a5f3
Merge branch 'main' into fix/alt-color
Avid29 d22466f
Merge branch 'main' into fix/alt-color
Avid29 5d50708
Fixed unneccesary event subscriptions in ListViewExtensions
Avid29 07a42d7
Merge branch 'CommunityToolkit:main' into fix/alt-color
Avid29 f2f45b5
More ListViewExtensions cleanup
Avid29 cf43149
Merge branch 'fix/alt-color' of https://github.com/Avid29/CommunityTo…
Avid29 38bed5e
Added AlternateStyle to ListViewExtensions
Avid29 fe7c8ce
Improved ListViewExtensions alternate color sample
Avid29 f0c942f
Merge branch 'CommunityToolkit:main' into alt-style
Avid29 0d23e1f
Fixed property updates for alternate row properties
Avid29 2298e00
Merge branch 'alt-style' of https://github.com/Avid29/CommunityToolki…
Avid29 4dde208
Merge branch 'main' into alt-style
Avid29 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
34 changes: 23 additions & 11 deletions
34
components/Extensions/samples/ListViewExtensionsAlternateColorSample.xaml
This file contains hidden or 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 |
|---|---|---|
| @@ -1,21 +1,33 @@ | ||
| <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:local="using:ExtensionsExperiment.Samples" | ||
| xmlns:ui="using:CommunityToolkit.WinUI" | ||
| Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
|
|
||
| <ListView ui:ListViewExtensions.AlternateColor="Silver"> | ||
| <ListView ui:ListViewExtensions.AlternateColor="Blue"> | ||
| <ui:ListViewExtensions.AlternateStyle> | ||
| <Style TargetType="ListViewItem"> | ||
| <Setter Property="MinHeight" Value="30" /> | ||
| </Style> | ||
| </ui:ListViewExtensions.AlternateStyle> | ||
| <ui:ListViewExtensions.AlternateItemTemplate> | ||
| <DataTemplate x:DataType="x:Int32"> | ||
| <TextBlock Text="{x:Bind local:ListViewExtensionsAlternateColorSample.NaiveHumanize((x:Int32))}" /> | ||
| </DataTemplate> | ||
| </ui:ListViewExtensions.AlternateItemTemplate> | ||
| <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> | ||
| <x:Int32>0</x:Int32> | ||
| <x:Int32>1</x:Int32> | ||
| <x:Int32>2</x:Int32> | ||
| <x:Int32>3</x:Int32> | ||
| <x:Int32>4</x:Int32> | ||
| <x:Int32>5</x:Int32> | ||
| <x:Int32>6</x:Int32> | ||
| <x:Int32>7</x:Int32> | ||
| <x:Int32>8</x:Int32> | ||
| <x:Int32>9</x:Int32> | ||
| <x:Int32>10</x:Int32> | ||
| </ListView.Items> | ||
| </ListView> | ||
| </Page> |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rename it to
AlternateItemContainerStyleto be consistent with the ItemContainerStyle property.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is definitely worth discussing...