How to handle properties with [ObservableProperty] and the base override with new
#570
Answered
by
Sergio0694
AndreasReitberger
asked this question in
Q&A
|
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 |
Answered by
Sergio0694
Jan 18, 2023
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. |
2 replies
Answer selected by
Sergio0694
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your example is not overriding a property, it's hiding one (shadowing). Is the question about how to get the
newto 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.