Skip to content

},DynamicData.Binding.IObservableCollection{--0},System.Int32)} },DynamicData.Binding.IObservableCollection{--0},DynamicData.Binding.BindingOptions)} },System.Collections.ObjectModel.ReadOnlyObservableCollection{--0}@,System.Int32)} },System.Collections.ObjectModel.ReadOnlyObservableCollection{--0}@,DynamicData.Binding.BindingOptions)} },System.ComponentModel.BindingList{--0},System.Int32)}

ObservableListEx.Bind(IObservable>, IObservableCollection, int) method

Defined in

Type: ObservableListEx Namespace: DynamicData Assembly: DynamicData.dll

Applies to

net10.0, netstandard2.0

Overloads

  1. public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, IObservableCollection<T> targetCollection, int resetThreshold = 25) where T : notnull

  2. public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, IObservableCollection<T> targetCollection, BindingOptions options) where T : notnull

  3. public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, out ReadOnlyObservableCollection<T> readOnlyObservableCollection, int resetThreshold = 25) where T : notnull

  4. public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, out ReadOnlyObservableCollection<T> readOnlyObservableCollection, BindingOptions options) where T : notnull

  5. public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, BindingList<T> bindingList, int resetThreshold = 25) where T : notnull

1. Overload

public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, IObservableCollection<T> targetCollection, int resetThreshold = 25) where T : notnull

View source

Summary: Applies changeset mutations to a target IObservableCollection for UI data binding.

Type parameters

NameDescription
TThe type of items in the list.

Parameters

NameTypeDescription
sourceIObservable>The source IObservable&lt;IChangeSet&lt;T&gt;&gt; to bind to a collection.
targetCollection[IObservableCollection](#The [IObservableCollection](# target collection to keep in sync.
resetThreshold = 25intWhen a changeset exceeds this many changes, the collection is reset instead of applying individual changes.

Returns: IObservable> -- A continuation of the source changeset stream (allows further chaining).

Remarks

Delegates to Adapt with an internal collection adaptor. Each changeset is applied to the target collection on the calling thread. For UI binding, ensure the source is observed on the UI thread (e.g., via ObserveOn).

EventBehavior
AddItem inserted at the specified index in the target collection.
AddRangeItems inserted as a range. If the count exceeds resetThreshold, the collection is cleared and repopulated.
ReplaceItem at the specified index is replaced.
RemoveItem at the specified index is removed.
RemoveRange/ClearItems removed from the collection.
MovedItem is moved between positions in the collection.
RefreshDepends on the adaptor implementation.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or targetCollection is null.

See also

2. Overload

public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, IObservableCollection<T> targetCollection, BindingOptions options) where T : notnull

View source

Inherited documentation

These docs were inherited from ObservableListEx. The member doesn't override them on this type.

Summary: Binds the source changeset stream to targetCollection, with fine-grained BindingOptions control over reset threshold and other behaviors.

Type parameters

NameDescription
TThe type of items in the list.

Parameters

NameTypeDescription
sourceIObservable>The source IObservable&lt;IChangeSet&lt;T&gt;&gt; to bind to a collection.
targetCollection[IObservableCollection](#The [IObservableCollection](# target collection to keep in sync.
options[BindingOptions](#--

Returns: IObservable> -- A continuation of the source changeset stream (allows further chaining).

Remarks

Delegates to Adapt with an internal collection adaptor. Each changeset is applied to the target collection on the calling thread. For UI binding, ensure the source is observed on the UI thread (e.g., via ObserveOn).

EventBehavior
AddItem inserted at the specified index in the target collection.
AddRangeItems inserted as a range. If the count exceeds resetThreshold, the collection is cleared and repopulated.
ReplaceItem at the specified index is replaced.
RemoveItem at the specified index is removed.
RemoveRange/ClearItems removed from the collection.
MovedItem is moved between positions in the collection.
RefreshDepends on the adaptor implementation.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or targetCollection is null.

See also

3. Overload

public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, out ReadOnlyObservableCollection<T> readOnlyObservableCollection, int resetThreshold = 25) where T : notnull

View source

Inherited documentation

These docs were inherited from ObservableListEx. The member doesn't override them on this type.

Summary: Constructs a ReadOnlyObservableCollection and binds the changeset stream to it. Use this overload when you need a read-only view (typically for UI binding) without managing the backing collection yourself. The created collection is returned via the readOnlyObservableCollection output parameter.

Type parameters

NameDescription
TThe type of items in the list.

Parameters

NameTypeDescription
sourceIObservable>The source IObservable&lt;IChangeSet&lt;T&gt;&gt; to bind to a collection.
out readOnlyObservableCollectionReadOnlyObservableCollection--
resetThreshold = 25intWhen a changeset exceeds this many changes, the collection is reset instead of applying individual changes.

Returns: IObservable> -- A continuation of the source changeset stream (allows further chaining).

Remarks

The created collection is backed by an internal ObservableCollectionExtended<T>. Callers receive only the read-only wrapper.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or targetCollection is null.

See also

4. Overload

public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, out ReadOnlyObservableCollection<T> readOnlyObservableCollection, BindingOptions options) where T : notnull

View source

Inherited documentation

These docs were inherited from ObservableListEx. The member doesn't override them on this type.

Summary: Constructs a ReadOnlyObservableCollection and binds the changeset stream to it, with fine-grained BindingOptions control over reset threshold and other behaviors. The created collection is returned via the readOnlyObservableCollection output parameter.

Type parameters

NameDescription
TThe type of items in the list.

Parameters

NameTypeDescription
sourceIObservable>The source IObservable&lt;IChangeSet&lt;T&gt;&gt; to bind to a collection.
out readOnlyObservableCollectionReadOnlyObservableCollection--
options[BindingOptions](#--

Returns: IObservable> -- A continuation of the source changeset stream (allows further chaining).

Remarks

The created collection is backed by an internal ObservableCollectionExtended<T>. Callers receive only the read-only wrapper.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or targetCollection is null.

See also

5. Overload

public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, BindingList<T> bindingList, int resetThreshold = 25) where T : notnull

View source

Inherited documentation

These docs were inherited from ObservableListEx. The member doesn't override them on this type.

Summary: Binds the source changeset stream to a WinForms BindingList, keeping bindingList in sync.

Type parameters

NameDescription
TThe type of items in the list.

Parameters

NameTypeDescription
sourceIObservable>The source IObservable&lt;IChangeSet&lt;T&gt;&gt; to bind to a collection.
bindingListBindingList--
resetThreshold = 25intWhen a changeset exceeds this many changes, the collection is reset instead of applying individual changes.

Returns: IObservable> -- A continuation of the source changeset stream (allows further chaining).

Remarks

Delegates to Adapt with an internal collection adaptor. Each changeset is applied to the target collection on the calling thread. For UI binding, ensure the source is observed on the UI thread (e.g., via ObserveOn).

EventBehavior
AddItem inserted at the specified index in the target collection.
AddRangeItems inserted as a range. If the count exceeds resetThreshold, the collection is cleared and repopulated.
ReplaceItem at the specified index is replaced.
RemoveItem at the specified index is removed.
RemoveRange/ClearItems removed from the collection.
MovedItem is moved between positions in the collection.
RefreshDepends on the adaptor implementation.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or targetCollection is null.

See also