Use properties to set visual states rather than strings

This commit is contained in:
Eric Wong(Azure) 2019-04-19 14:55:12 -07:00
commit c6a603c7d1

View file

@ -152,19 +152,18 @@ void UnitConverter::OnOfflineNetworkAccess()
void UnitConverter::SetNormalCurrencyStatus()
{
VisualStateManager::GoToState(this, L"NormalCurrencyStatus", false);
CurrencySecondaryStatus->Text = L"";
VisualStateManager::GoToState(this, NormalCurrencyStatus->Name, false);
}
void UnitConverter::SetChargesMayApplyStatus()
{
VisualStateManager::GoToState(this, L"ChargesMayApplyCurrencyStatus", false);
VisualStateManager::GoToState(this, ChargesMayApplyCurrencyStatus->Name, false);
CurrencySecondaryStatus->Text = m_chargesMayApplyText;
}
void UnitConverter::SetFailedToRefreshStatus()
{
VisualStateManager::GoToState(this, L"FailedCurrencyStatus", false);
VisualStateManager::GoToState(this, FailedCurrencyStatus->Name, false);
CurrencySecondaryStatus->Text = m_failedToRefreshText;
}