I'm using this lib over the app and noticed if I do complex binding to the code generated property of CommunityToolkit.Mvvm package ObservablePropertyAttribute, and the property was not set, then I get null reference exception
Example
[ObservableProperty] private UserObservableModel _profile;
and do this in xaml
<Image Source="{x:Bind Profile.ImageUrl, TargetNullValue=images:Images.ImagePlaceholder}" />
F.e. if I have only string property to the image this works ok
[ObservableProperty] private string _imageUrl;
and do this in xaml
<Image Source="{x:Bind ImageUrl, TargetNullValue=images:Images.ImagePlaceholder}" />
Default {Binding Profile.ImageUrl, TargetNullValue=images:Images.ImagePlaceholder} works perfect
I'm using this lib over the app and noticed if I do complex binding to the code generated property of CommunityToolkit.Mvvm package ObservablePropertyAttribute, and the property was not set, then I get null reference exception
Example
[ObservableProperty] private UserObservableModel _profile;and do this in xaml
<Image Source="{x:Bind Profile.ImageUrl, TargetNullValue=images:Images.ImagePlaceholder}" />F.e. if I have only string property to the image this works ok
[ObservableProperty] private string _imageUrl;and do this in xaml
<Image Source="{x:Bind ImageUrl, TargetNullValue=images:Images.ImagePlaceholder}" />Default {Binding Profile.ImageUrl, TargetNullValue=images:Images.ImagePlaceholder} works perfect