From 0f1d6c29cf5f483de849b8fbcc7c8d589fb3cd18 Mon Sep 17 00:00:00 2001 From: Rudy Huyn Date: Wed, 13 Mar 2019 14:52:05 -0700 Subject: [PATCH] Use the same layout than the existing one while fixing the issue --- src/Calculator/Views/UnitConverter.xaml | 19 ++++++++++++------- src/Calculator/Views/UnitConverter.xaml.cpp | 7 +++++++ src/Calculator/Views/UnitConverter.xaml.h | 1 + 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/Calculator/Views/UnitConverter.xaml b/src/Calculator/Views/UnitConverter.xaml index a1763c15..ca3a63e4 100644 --- a/src/Calculator/Views/UnitConverter.xaml +++ b/src/Calculator/Views/UnitConverter.xaml @@ -347,6 +347,7 @@ + @@ -585,12 +586,16 @@ TabIndex="4" Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}"/> - + - + IsActive = false; } + + +void CalculatorApp::UnitConverter::SupplementaryResultsPanelInGrid_SizeChanged(Platform::Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e) +{ + //We add 0.01 to be sure to not create an infinite loop with SizeChanged events cascading due to float approximation + RowDltrUnits->MinHeight = max(48, e->NewSize.Height + 0.01); +} diff --git a/src/Calculator/Views/UnitConverter.xaml.h b/src/Calculator/Views/UnitConverter.xaml.h index b4b84449..df370eaa 100644 --- a/src/Calculator/Views/UnitConverter.xaml.h +++ b/src/Calculator/Views/UnitConverter.xaml.h @@ -88,5 +88,6 @@ namespace CalculatorApp Windows::UI::Xaml::DispatcherTimer^ m_delayTimer; bool m_isAnimationEnabled; + void SupplementaryResultsPanelInGrid_SizeChanged(Platform::Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e); }; }