IReactiveView.ToProperty(Action>) method¶
Defined in
Type: IReactiveViewReactiveList.Reactive.Views
Assembly: ReactiveList.Reactive.dll
Applies to
net11.0, net10.0, net47, net471, net472, net48, net481
Overloads¶
-
TView ToProperty(Action<ReadOnlyObservableCollection<TItem>> propertySetter) -
TView ToProperty(out ReadOnlyObservableCollection<TItem> collection)
1. Overload¶
TView ToProperty(Action<ReadOnlyObservableCollection<TItem>> propertySetter)
Summary: Assigns the current collection of items to a property using the specified setter action.
Parameters
| Name | Type | Description |
|---|---|---|
propertySetter | Action | An action that sets a property to the current read-only observable collection of items. Cannot be null. |
Returns: TView -- The current instance to enable method chaining.
Remarks
This method is typically used to bind the internal collection to an external property, such as a view model property, in a reactive UI pattern.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException (opens in a new tab) | Thrown if propertySetter is null. |
2. Overload¶
TView ToProperty(out ReadOnlyObservableCollection<TItem> collection)
Summary: Returns the current instance and provides a read-only observable collection of items contained in the view.
Parameters
| Name | Type | Description |
|---|---|---|
out collection | ReadOnlyObservableCollection | When this method returns, contains a read-only observable collection of items managed by the view. |
Returns: TView -- The current instance.