How to handle properties with [ObservableProperty]
and the base override with new
#570
-
I'm using a [ObservableProperty]
bool simulatePrint = true;
bool _isPrinterOnline = false;
public new bool IsPrinterOnline
{
get => _isPrinterOnline;
set
{
if (_isPrinterOnline == value) return;
_isPrinterOnline = value;
OpenCurrentPrintPageCommand.ChangeCanExecute();
OnPropertyChanged();
}
} What's the best approach to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Your example is not overriding a property, it's hiding one (shadowing). Is the question about how to get the EDIT: this is not currently supported and it will be with #555. |
Beta Was this translation helpful? Give feedback.
Your example is not overriding a property, it's hiding one (shadowing). Is the question about how to get the
new
to be generated in the observable property? Otherwise I'm not entirely sure what the request is here 🤔EDIT: this is not currently supported and it will be with #555.