Skip to content

* Use MultiSelector's UnselectAll() method instead of iterating over … - #486

Merged
punker76 merged 1 commit into
punker76:developfrom
BerndHaidan:Optimize_SetSelectedItemExtension
Mar 14, 2024
Merged

punker76 merged 1 commit into
punker76:developfrom
BerndHaidan:Optimize_SetSelectedItemExtension

Conversation

@BerndHaidan

Copy link
Copy Markdown
Contributor

…the collection with items to deselect; This increases the performance significant!

e.g. for a DataGrid with 5.000 rows from > 3s to < 20ms

What changed?

Extension Method SetSelectedItem in ItemsControlExtensions.cs is adapted.
Instead collect items to deselect and iterating over this collection, use UnselectAll() method.

To demonstrate the difference the DataGrid Sample is modified too.

An issue wasn't open yet.

…the collection with items to deselect; This increases the performance significant!

e.g. for a DataGrid with 5.000 rows from >3s to < 20ms
@punker76 punker76 added this to the 4.0.0 milestone Mar 14, 2024
@punker76
punker76 merged commit 22dfca8 into punker76:develop Mar 14, 2024
@punker76

Copy link
Copy Markdown
Owner

@BerndHaidan your changes have been merged, thanks for your contribution 👍

@BerndHaidan

Copy link
Copy Markdown
Contributor Author

Was a pleasure. 😊
Thanks for publishing this really helpful library. 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants