WPF ReactiveUI custom property setter

24 Views Asked by At
[Reactive] public bool IsSealed { get; set; } = true;

private int _value;
public int Value
{
    get => _value;
    set
    {
        if (!IsSealed)
            this.RaiseAndSetIfChanged(ref _value, value);
    }
}

Hi all! Has any way to do this more readable? Mabe with this.WhenAny... or something?

I tried to did it with validation but i think it's a wrong way

0

There are 0 best solutions below