WpfObservableRangeCollection 2.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package WpfObservableRangeCollection --version 2.1.0
                    
NuGet\Install-Package WpfObservableRangeCollection -Version 2.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WpfObservableRangeCollection" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WpfObservableRangeCollection" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="WpfObservableRangeCollection" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WpfObservableRangeCollection --version 2.1.0
                    
#r "nuget: WpfObservableRangeCollection, 2.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=WpfObservableRangeCollection&version=2.1.0
                    
Install WpfObservableRangeCollection as a Cake Addin
#tool nuget:?package=WpfObservableRangeCollection&version=2.1.0
                    
Install WpfObservableRangeCollection as a Cake Tool

WpfObservableRangeCollection

Provides ObservableRangeCollection and its WPF version, including AddRange, InsertRange, RemoveRange/RemoveAll, Replace/ReplaceRange methods for bulk operation to avoid frequent update notification events.


NuGet


Classes

Why WpfObservableRangeCollection?

See ObservableCollection Doesn't support AddRange method, so I get notified for each item added, besides what about INotifyCollectionChanging? - StackOverflow

I've searched the web for some ObservableCollections that have *Range methods, but they all raise various exceptions(and some strange problems) in certain specific situations:

  • System.NotSupportedException: Range actions are not supported.
  • System.InvalidOperationException: The "x" index in the collection change event is not valid for collections of size "y".
  • More? I'm not sure. I forgot.

In the end, I chose weitzhandler/RangeObservableCollection and weitzhandler/WpfObservableRangeCollection and made slight changes to the code, and finally, I didn't encounter any problems, for now.

If the NotSupportedException still occurred, try using BindingOperations.EnableCollectionSynchronization(IEnumerable, Object).

Seealso

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.2.2 376 3 months ago
2.2.1 802 11/16/2023
2.2.0 382 7/28/2023
2.1.0 215 7/23/2023
2.0.1 190 7/23/2023
2.0.0 175 7/23/2023
1.0.0 182 7/22/2023