Fix auto-scaling of CalculationResult when the current locale displays currency symbols on the right (#246)

* Fix auto-scaling of CalculationResult when the current locale displays symbols at the right

* Formatting

* add padding

* modify padding of ValueContainer
This commit is contained in:
Rudy Huyn 2019-03-20 09:54:02 -07:00 committed by Stephanie Anderl
commit 4b6b8fa8fa
2 changed files with 26 additions and 18 deletions

View file

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// UnitConverter.xaml.cpp
@ -63,15 +63,7 @@ UnitConverter::UnitConverter() :
// Is currency symbol preference set to right side
bool preferRight = LocalizationSettings::GetInstance().GetCurrencySymbolPrecedence() == 0;
if (preferRight)
{
// Currency symbol should appear on the right. Reverse the order of children.
Grid::SetColumn(Value1, 0);
Grid::SetColumn(CurrencySymbol1Block, 1);
Grid::SetColumn(Value2, 0);
Grid::SetColumn(CurrencySymbol2Block, 1);
}
VisualStateManager::GoToState(this, preferRight ? "CurrencySymbolRightState" : "CurrencySymbolLeftState", false);
auto userSettings = ref new UISettings();
m_isAnimationEnabled = userSettings->AnimationsEnabled;
@ -268,7 +260,6 @@ void UnitConverter::OnPasteMenuItemClicked(_In_ Object^ sender, _In_ RoutedEvent
void UnitConverter::AnimateConverter()
{
if (App::IsAnimationEnabled())
{
AnimationStory->Begin();