File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ ReactiveUI Source Generators automatically generate ReactiveUI objects to stream
4141- ` [RoutedControlHost("YourNameSpace.CustomControl")] `
4242- ` [ViewModelControlHost("YourNameSpace.CustomControl")] `
4343- ` [BindableDerivedList] ` Generates a derived list from a ReadOnlyObservableCollection backing field
44+ - ` [ReactiveCollection] ` Generates property changed notifications on add, remove, new actions on a ObservableCollection backing field
4445
4546### Compatibility Notes
4647- For ReactiveUI versions ** older than V19.5.31** , all ` [ReactiveCommand] ` options are supported except for async methods with a ` CancellationToken ` .
@@ -587,6 +588,24 @@ using ReactiveUI.SourceGenerators.WinForms;
587588public partial class MyCustomViewModelControlHost ;
588589```
589590
591+ ### ReactiveCollection
592+ ``` csharp
593+ using System .Collections .ObjectModel ;
594+ using ReactiveUI ;
595+ using ReactiveUI .SourceGenerators ;
596+
597+ public partial class MyReactiveClass : ReactiveObject
598+ {
599+ [ReactiveCollection ]
600+ private ObservableCollection <string > _myCollection ;
601+
602+ public MyReactiveClass ()
603+ {
604+ MyCollection = new ObservableCollection <string >();
605+ _myCollection .Add (" Item 1" );
606+ }
607+ }
608+ ```
590609
591610### TODO:
592611- Add ObservableAsProperty to generate from a IObservable method with parameters.
You can’t perform that action at this time.
0 commit comments