},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¶
-
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, IObservableCollection<T> targetCollection, int resetThreshold = 25) where T : notnull -
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, IObservableCollection<T> targetCollection, BindingOptions options) where T : notnull -
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, out ReadOnlyObservableCollection<T> readOnlyObservableCollection, int resetThreshold = 25) where T : notnull -
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, out ReadOnlyObservableCollection<T> readOnlyObservableCollection, BindingOptions options) where T : notnull -
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
Summary: Applies changeset mutations to a target IObservableCollection for UI data binding.
Type parameters
| Name | Description |
|---|---|
T | The type of items in the list. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source IObservable<IChangeSet<T>> to bind to a collection. |
targetCollection | [IObservableCollection | The [IObservableCollection](# target collection to keep in sync. |
resetThreshold = 25 | int | When a changeset exceeds this many changes, the collection is reset instead of applying individual changes. |
Returns: IObservable
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).
| Event | Behavior |
|---|---|
| Add | Item inserted at the specified index in the target collection. |
| AddRange | Items inserted as a range. If the count exceeds resetThreshold, the collection is cleared and repopulated. |
| Replace | Item at the specified index is replaced. |
| Remove | Item at the specified index is removed. |
| RemoveRange/Clear | Items removed from the collection. |
| Moved | Item is moved between positions in the collection. |
| Refresh | Depends on the adaptor implementation. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or targetCollection is null. |
See also
- DynamicData.ObservableListEx.Bind
1(System.IObservable{DynamicData.IChangeSet{0}},DynamicData.Binding.IObservableCollection{``0},DynamicData.Binding.BindingOptions) - DynamicData.ObservableListEx.Bind
1(System.IObservable{DynamicData.IChangeSet{0}},System.Collections.ObjectModel.ReadOnlyObservableCollection{``0}@,System.Int32) - DynamicData.ObservableListEx.Clone
1(System.IObservable{DynamicData.IChangeSet{0}},System.Collections.Generic.IList{``0}) - DynamicData.ObservableListEx.Adapt
1(System.IObservable{DynamicData.IChangeSet{0}},DynamicData.IChangeSetAdaptor{``0}) - DynamicData.ObservableCacheEx.Bind
2(System.IObservable{DynamicData.IChangeSet{0,1}},DynamicData.Binding.IObservableCollection{0},System.Int32)
2. Overload¶
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, IObservableCollection<T> targetCollection, BindingOptions options) where T : notnull
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
| Name | Description |
|---|---|
T | The type of items in the list. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source IObservable<IChangeSet<T>> to bind to a collection. |
targetCollection | [IObservableCollection | The [IObservableCollection](# target collection to keep in sync. |
options | [BindingOptions](# | -- |
Returns: IObservable
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).
| Event | Behavior |
|---|---|
| Add | Item inserted at the specified index in the target collection. |
| AddRange | Items inserted as a range. If the count exceeds resetThreshold, the collection is cleared and repopulated. |
| Replace | Item at the specified index is replaced. |
| Remove | Item at the specified index is removed. |
| RemoveRange/Clear | Items removed from the collection. |
| Moved | Item is moved between positions in the collection. |
| Refresh | Depends on the adaptor implementation. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or targetCollection is null. |
See also
- DynamicData.ObservableListEx.Bind
1(System.IObservable{DynamicData.IChangeSet{0}},DynamicData.Binding.IObservableCollection{``0},DynamicData.Binding.BindingOptions) - DynamicData.ObservableListEx.Bind
1(System.IObservable{DynamicData.IChangeSet{0}},System.Collections.ObjectModel.ReadOnlyObservableCollection{``0}@,System.Int32) - DynamicData.ObservableListEx.Clone
1(System.IObservable{DynamicData.IChangeSet{0}},System.Collections.Generic.IList{``0}) - DynamicData.ObservableListEx.Adapt
1(System.IObservable{DynamicData.IChangeSet{0}},DynamicData.IChangeSetAdaptor{``0}) - DynamicData.ObservableCacheEx.Bind
2(System.IObservable{DynamicData.IChangeSet{0,1}},DynamicData.Binding.IObservableCollection{0},System.Int32)
3. Overload¶
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, out ReadOnlyObservableCollection<T> readOnlyObservableCollection, int resetThreshold = 25) where T : notnull
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
| Name | Description |
|---|---|
T | The type of items in the list. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source IObservable<IChangeSet<T>> to bind to a collection. |
out readOnlyObservableCollection | ReadOnlyObservableCollection | -- |
resetThreshold = 25 | int | When a changeset exceeds this many changes, the collection is reset instead of applying individual changes. |
Returns: IObservable
Remarks
The created collection is backed by an internal ObservableCollectionExtended<T>. Callers receive only the read-only wrapper.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or targetCollection is null. |
See also
- DynamicData.ObservableListEx.Bind
1(System.IObservable{DynamicData.IChangeSet{0}},DynamicData.Binding.IObservableCollection{``0},DynamicData.Binding.BindingOptions) - DynamicData.ObservableListEx.Bind
1(System.IObservable{DynamicData.IChangeSet{0}},System.Collections.ObjectModel.ReadOnlyObservableCollection{``0}@,System.Int32) - DynamicData.ObservableListEx.Clone
1(System.IObservable{DynamicData.IChangeSet{0}},System.Collections.Generic.IList{``0}) - DynamicData.ObservableListEx.Adapt
1(System.IObservable{DynamicData.IChangeSet{0}},DynamicData.IChangeSetAdaptor{``0}) - DynamicData.ObservableCacheEx.Bind
2(System.IObservable{DynamicData.IChangeSet{0,1}},DynamicData.Binding.IObservableCollection{0},System.Int32)
4. Overload¶
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, out ReadOnlyObservableCollection<T> readOnlyObservableCollection, BindingOptions options) where T : notnull
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
| Name | Description |
|---|---|
T | The type of items in the list. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source IObservable<IChangeSet<T>> to bind to a collection. |
out readOnlyObservableCollection | ReadOnlyObservableCollection | -- |
options | [BindingOptions](# | -- |
Returns: IObservable
Remarks
The created collection is backed by an internal ObservableCollectionExtended<T>. Callers receive only the read-only wrapper.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or targetCollection is null. |
See also
- DynamicData.ObservableListEx.Bind
1(System.IObservable{DynamicData.IChangeSet{0}},DynamicData.Binding.IObservableCollection{``0},DynamicData.Binding.BindingOptions) - DynamicData.ObservableListEx.Bind
1(System.IObservable{DynamicData.IChangeSet{0}},System.Collections.ObjectModel.ReadOnlyObservableCollection{``0}@,System.Int32) - DynamicData.ObservableListEx.Clone
1(System.IObservable{DynamicData.IChangeSet{0}},System.Collections.Generic.IList{``0}) - DynamicData.ObservableListEx.Adapt
1(System.IObservable{DynamicData.IChangeSet{0}},DynamicData.IChangeSetAdaptor{``0}) - DynamicData.ObservableCacheEx.Bind
2(System.IObservable{DynamicData.IChangeSet{0,1}},DynamicData.Binding.IObservableCollection{0},System.Int32)
5. Overload¶
public static IObservable<IChangeSet<T>> Bind<T>(this IObservable<IChangeSet<T>> source, BindingList<T> bindingList, int resetThreshold = 25) where T : notnull
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
| Name | Description |
|---|---|
T | The type of items in the list. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source IObservable<IChangeSet<T>> to bind to a collection. |
bindingList | BindingList | -- |
resetThreshold = 25 | int | When a changeset exceeds this many changes, the collection is reset instead of applying individual changes. |
Returns: IObservable
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).
| Event | Behavior |
|---|---|
| Add | Item inserted at the specified index in the target collection. |
| AddRange | Items inserted as a range. If the count exceeds resetThreshold, the collection is cleared and repopulated. |
| Replace | Item at the specified index is replaced. |
| Remove | Item at the specified index is removed. |
| RemoveRange/Clear | Items removed from the collection. |
| Moved | Item is moved between positions in the collection. |
| Refresh | Depends on the adaptor implementation. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or targetCollection is null. |
See also
- DynamicData.ObservableListEx.Bind
1(System.IObservable{DynamicData.IChangeSet{0}},DynamicData.Binding.IObservableCollection{``0},DynamicData.Binding.BindingOptions) - DynamicData.ObservableListEx.Bind
1(System.IObservable{DynamicData.IChangeSet{0}},System.Collections.ObjectModel.ReadOnlyObservableCollection{``0}@,System.Int32) - DynamicData.ObservableListEx.Clone
1(System.IObservable{DynamicData.IChangeSet{0}},System.Collections.Generic.IList{``0}) - DynamicData.ObservableListEx.Adapt
1(System.IObservable{DynamicData.IChangeSet{0}},DynamicData.IChangeSetAdaptor{``0}) - DynamicData.ObservableCacheEx.Bind
2(System.IObservable{DynamicData.IChangeSet{0,1}},DynamicData.Binding.IObservableCollection{0},System.Int32)