diff --git a/src/Calculator/Views/UnitConverter.xaml b/src/Calculator/Views/UnitConverter.xaml
index ba533d3..b2d8d3d 100644
--- a/src/Calculator/Views/UnitConverter.xaml
+++ b/src/Calculator/Views/UnitConverter.xaml
@@ -260,14 +260,6 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Grid.ColumnSpan="4">
@@ -475,8 +538,7 @@
Grid.Row="1"
Grid.Column="1"
HorizontalAlignment="{x:Bind FlowDirectionHorizontalAlignment}"
- Style="{ThemeResource ValueContainerStyle}"
- Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}">
+ Style="{ThemeResource ValueContainerStyle}">
@@ -520,15 +582,13 @@
ItemTemplate="{StaticResource UnitTemplate}"
ItemsSource="{Binding Units, Converter={StaticResource AlwaysSelectedConverter}}"
SelectedItem="{Binding Unit1, Mode=TwoWay, Converter={StaticResource ValidSelectedItemConverter}}"
- TabIndex="2"
- Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}"/>
+ TabIndex="2"/>
+ Style="{ThemeResource ValueContainerStyle}">
@@ -572,8 +632,7 @@
ItemTemplate="{StaticResource UnitTemplate}"
ItemsSource="{Binding Units, Converter={StaticResource AlwaysSelectedConverter}}"
SelectedItem="{Binding Unit2, Mode=TwoWay, Converter={StaticResource ValidSelectedItemConverter}}"
- TabIndex="4"
- Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}"/>
+ TabIndex="4"/>
+ SizeChanged="SupplementaryResultsPanelInGrid_SizeChanged">
NetworkBehavior == NetworkAccessBehavior::OptIn)
+ // If IsCurrencyLoadingVisible is true that means CurrencyRefreshButton_Click was recently called
+ // and is still executing. In this case there is no reason to process the click.
+ if (!Model->IsCurrencyLoadingVisible)
{
- m_meteredConnectionOverride = true;
- }
+ if (Model->NetworkBehavior == NetworkAccessBehavior::OptIn)
+ {
+ m_meteredConnectionOverride = true;
+ }
- Model->RefreshCurrencyRatios();
+ Model->RefreshCurrencyRatios();
+ }
}
void UnitConverter::OnDataContextChanged(_In_ FrameworkElement ^ sender, _In_ DataContextChangedEventArgs ^ args)
@@ -320,15 +325,16 @@ void UnitConverter::OnIsDisplayVisibleChanged()
{
if (Model->IsCurrencyLoadingVisible)
{
+ VisualStateManager::GoToState(this, L"CurrencyLoadingState", false);
StartProgressRingWithDelay();
}
else
{
HideProgressRing();
- if (m_isAnimationEnabled && Model->IsCurrencyCurrentCategory && !Model->CurrencyTimestamp->IsEmpty())
+ if (Model->IsCurrencyCurrentCategory && !Model->CurrencyTimestamp->IsEmpty())
{
- TimestampFadeInAnimation->Begin();
+ VisualStateManager::GoToState(this, L"CurrencyLoadedState", m_isAnimationEnabled);
}
}
}