Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

ViewModel with bindable properties

David Sungaila edited this page Sep 18, 2020 · 1 revision

Let your class derive from PresentationBase.ViewModel. Create a backing field and make sure your property setter calls SetProperty.

public class AwesomeViewModel : ViewModel
{
    private string _name;
  
    public string Name
    {
        get => _name;
        set => SetProperty(ref _name, value);
    }
}