-
Notifications
You must be signed in to change notification settings - Fork 126
[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
base: main
Are you sure you want to change the base?
Conversation
|
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), |
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 AlternateItemContainerStyle to 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...
Fixes #767 #769
PR Type
What kind of change does this PR introduce?
Extends the existing API for
ListViewExtensionsand lightly adjusts the event subscription/handling behaviorWhat 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
Styleof alternate row elements are adjustable using theAlternateStyleattached 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:
Other information