I am trying to build a UI using Avalonia. I have been plowing through it, but I hit a snag. This is the example code they provide:
using ReactiveUI;
public class MyViewModel : ReactiveObject
{
private string caption;
public string Caption
{
get => caption;
set => this.RaiseAndSetIfChanged(ref caption, value);
}
}
I need to set properties to "RaiseAndSetIfChanged", which require setting the get; set; of the variable within the class. I'm not sure how to do this in Powershell.
I have tried things like this:
Powershell class implement get set property
To no avail, but maybe I wasn't doing it right.
Alternatively, if there would be a different way to set RaiseAndSetIfChanged after [MyViewModel]::New()
was called
Link to Example: