Closed Nice3point closed 2 years ago
https://github.com/chuongmep/RevitAddInManager/blob/8faa9fff26524c74eb5aadeb4e6bf3ae115c69cd/AddInManager/ViewModel/AddInManagerViewModel.cs#L36
The INotifyPropertyChanged interface provides a method: private void OnPropertyChanged([CallerMemberName] string propertyName = null)
private void OnPropertyChanged([CallerMemberName] string propertyName = null)
Here is the correct use case for property with notification:
public string CommandItems { get => _commandItems; set { if (value == _commandItems) return; _commandItems = value; OnPropertyChanged(); } }
Using ref and other overloads is superfluous.
Many thanks @Nice3point, fixed include application
https://github.com/chuongmep/RevitAddInManager/blob/8faa9fff26524c74eb5aadeb4e6bf3ae115c69cd/AddInManager/ViewModel/AddInManagerViewModel.cs#L36
The INotifyPropertyChanged interface provides a method:
private void OnPropertyChanged([CallerMemberName] string propertyName = null)
Here is the correct use case for property with notification:
Using ref and other overloads is superfluous.