@@ -18,8 +18,12 @@ public AboutPageViewModel(INavigationService navigationService) : base(navigatio
1818
1919    public  int  Counter  {  get ;  protected  set ;  } 
2020
21-     [ ObservableProperty ] 
22-     private  ObservableCollection < AboutItem >  _aboutItems ; 
21+     private  ObservableCollection < AboutItem > ?  _aboutItems ; 
22+     public  ObservableCollection < AboutItem > ?  AboutItems 
23+     { 
24+         get  =>  _aboutItems ; 
25+         set  =>  SetProperty ( ref  _aboutItems ,  value ) ; 
26+     } 
2327
2428    public  override  void  Prepare ( AboutPageArgs  parameters ) 
2529    { 
@@ -28,13 +32,13 @@ public override void Prepare(AboutPageArgs parameters)
2832
2933    public  override  Task  InitializeAsync ( CancellationToken  token  =  default ) 
3034    { 
31-         AboutItems  =   new   ObservableCollection < AboutItem > 
32-         { 
35+         AboutItems  = 
36+         [ 
3337            new ( )  {  Name  =  "Test1" ,  Description  =  "Desc 1"  } , 
3438            new ( )  {  Name  =  "Test2" ,  Description  =  "Desc 2"  } , 
3539            new ( )  {  Name  =  "Test3" ,  Description  =  "Desc 3"  } , 
3640            new ( )  {  Name  =  "Test4" ,  Description  =  "Desc 4"  } , 
37-         } ; 
41+         ] ; 
3842
3943        return  Task . CompletedTask ; 
4044    } 
@@ -44,9 +48,9 @@ private async Task DoDoneCommand() =>
4448
4549    [ RelayCommand ] 
4650    private  void  Add ( )  => 
47-         AboutItems . Add ( new ( )  {  Name  =  Guid . NewGuid ( ) . ToString ( ) ,  Description  =  "Test"  } ) ; 
51+         AboutItems ? . Add ( new ( )  {  Name  =  Guid . NewGuid ( ) . ToString ( ) ,  Description  =  "Test"  } ) ; 
4852
4953    [ RelayCommand ] 
5054    private  void  Selected ( AboutItem  item )  => 
51-        AboutItems . Add ( item ) ; 
55+        AboutItems ? . Add ( item ) ; 
5256} 
0 commit comments