Improve performance of SupplementaryResult + Modify the height of RowDltrUnits when UnitConverter is in Landscape (#249)

* Modify the height of RowDltrUnits when UnitConverter  is in LandscapeLayout mode

* clean

* Use the same layout than the existing one while fixing the issue

* Refactor SupplementaryItemsControl to improve performance, not rely on parents and not force the parent element to be HorizonAlignment="stretch"

* take feedback into account

* add HorizontalNoOverflowStackPanel to vcproj.filters

* format conditionals

* replace max by std::max
This commit is contained in:
Rudy Huyn
2019-03-26 11:24:36 -07:00
committed by Pepe Rivera
parent e9aea9237d
commit ef3f5e9cbb
11 changed files with 151 additions and 82 deletions

View File

@@ -1,4 +1,4 @@
<UserControl x:Class="CalculatorApp.UnitConverter"
<UserControl x:Class="CalculatorApp.UnitConverter"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:automation="using:CalculatorApp.Common.Automation"
@@ -593,15 +593,20 @@
TabIndex="4"
Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}"/>
<Grid x:Name="SupplementaryResultsPanelInGrid"
Grid.Row="5"
Grid.Column="1"
Margin="12,0,12,0"
FlowDirection="{x:Bind LayoutDirection}"
Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}">
<StackPanel x:Name="SupplementaryResultsPanelInGrid"
Grid.Row="5"
Grid.Column="1"
MinHeight="48"
Margin="12,0,6,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
FlowDirection="{x:Bind LayoutDirection}"
SizeChanged="SupplementaryResultsPanelInGrid_SizeChanged"
Visibility="{x:Bind Model.IsCurrencyLoadingVisible, Mode=OneWay, Converter={StaticResource BooleanToVisibilityNegationConverter}}">
<local:SupplementaryResults x:Name="SupplementaryResults"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Results="{x:Bind Model.SupplementaryResults, Mode=OneWay}"
Visibility="{x:Bind Model.SupplementaryVisibility, Mode=OneWay}"/>
<StackPanel Visibility="{x:Bind Model.IsCurrencyCurrentCategory, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}">
<!-- Currency Ratio Equality -->
@@ -651,7 +656,7 @@
</TextBlock>
</ContentControl>
</StackPanel>
</Grid>
</StackPanel>
<Grid x:Name="ConverterNumPad"
Grid.Row="6"