From 8cdc17765810eef517b2c40e55f30eacde24be29 Mon Sep 17 00:00:00 2001 From: "Wei (Waley) Zhang" Date: Tue, 27 Oct 2020 15:56:21 -0700 Subject: [PATCH] Fixed Negative Button for converters inconsistent with visibility (#1410) When the unit converter's category is changed, the corresponding property setter for the CurrentCategory variable mistakenly calls OnPropertyChanged("CurrentCategory") instead of RaisePropertyChanged("CurrentCategory"). This results in a failure to notify XAML that the CurrentCategory variable has changed, resulting in the corresponding UI to not be updated accordingly. --- src/CalcViewModel/UnitConverterViewModel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CalcViewModel/UnitConverterViewModel.h b/src/CalcViewModel/UnitConverterViewModel.h index 1f95a47..a5287e4 100644 --- a/src/CalcViewModel/UnitConverterViewModel.h +++ b/src/CalcViewModel/UnitConverterViewModel.h @@ -187,7 +187,7 @@ namespace CalculatorApp auto currentCategory = value->GetModelCategory(); IsCurrencyCurrentCategory = currentCategory.id == CalculatorApp::Common::NavCategory::Serialize(CalculatorApp::Common::ViewMode::Currency); } - OnPropertyChanged("CurrentCategory"); + RaisePropertyChanged("CurrentCategory"); } }