Skip to content

Conversation

@Avid29
Copy link
Contributor

@Avid29 Avid29 commented Dec 29, 2025

Fixes #767 #769

PR Type

What kind of change does this PR introduce?

Extends the existing API for ListViewExtensions and lightly adjusts the event subscription/handling behavior

What is the current behavior?

Currently, only the background color of an alternate row is adjustable.

Also, event subscriptions are handled separately for each AlternateRow attached property.

What is the new behavior?

Now the Style of alternate row elements are adjustable using the AlternateStyle attached property.

Additionally, the handling and subscriptions to events have been grouped into one event adjusting as appropriate for each set property.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • Tested code with current supported SDKs
  • New component
    • Documentation has been added
    • Sample in sample app has been added
    • Analyzers are passing for documentation and samples
    • Icon has been created (if new sample) following the Thumbnail Style Guide and templates
  • Tests for the changes have been added (if applicable)
  • Header has been added to all new source files
  • Contains NO breaking changes

Other information

@Avid29 Avid29 marked this pull request as draft December 29, 2025 05:53
@Avid29
Copy link
Contributor Author

Avid29 commented Dec 29, 2025

NOTE: This PR is based on #763 and should remain a draft until that PR is merged

/// Attached <see cref="DependencyProperty"/> for binding a <see cref="Style"/> as an alternate style to a <see cref="ListViewBase"/>
/// </summary>
public static readonly DependencyProperty AlternateStyleProperty =
DependencyProperty.RegisterAttached("AlternateStyle", typeof(Style), typeof(ListViewExtensions),

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 AlternateItemContainerStyle to be consistent with the ItemContainerStyle property.

Copy link
Contributor Author

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...

@Arlodotexe Arlodotexe added enhancement New feature or request components::extensions Extensions for text, framework components, visual transforms, shadows, and more. labels Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

components::extensions Extensions for text, framework components, visual transforms, shadows, and more. enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Extensions] Add AlternateStyle attached property for ListViewExtensions

3 participants