mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-23 06:25:19 -07:00
Merge pull request #65 from nventive/dev/djo/history-flyout
Enable History flyout on phone layout
This commit is contained in:
commit
a1ad61900e
8 changed files with 31 additions and 30 deletions
|
@ -66,7 +66,7 @@
|
||||||
<PackageReference Include="Newtonsoft.Json">
|
<PackageReference Include="Newtonsoft.Json">
|
||||||
<Version>12.0.2</Version>
|
<Version>12.0.2</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Uno.UI" Version="1.45.0-dev.1560" />
|
<PackageReference Include="Uno.UI" Version="1.45.0-dev.1595" />
|
||||||
<PackageReference Include="Uno.UniversalImageLoader" Version="1.9.32" />
|
<PackageReference Include="Uno.UniversalImageLoader" Version="1.9.32" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
|
||||||
|
|
|
@ -598,7 +598,8 @@ namespace CalculatorApp
|
||||||
HistoryButton.Focus(FocusState.Programmatic);
|
HistoryButton.Focus(FocusState.Programmatic);
|
||||||
}
|
}
|
||||||
|
|
||||||
FullscreenFlyoutClosed();
|
// UNO TODO
|
||||||
|
//FullscreenFlyoutClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CloseHistoryFlyout()
|
public void CloseHistoryFlyout()
|
||||||
|
@ -692,7 +693,8 @@ namespace CalculatorApp
|
||||||
MemoryButton.Focus(FocusState.Programmatic);
|
MemoryButton.Focus(FocusState.Programmatic);
|
||||||
}
|
}
|
||||||
|
|
||||||
FullscreenFlyoutClosed();
|
// UNO TODO
|
||||||
|
//FullscreenFlyoutClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
Memory GetMemory()
|
Memory GetMemory()
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<UserControl x:Class="CalculatorApp.HistoryList"
|
<UserControl x:Class="CalculatorApp.HistoryList"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:xamarin="http://platform.uno/xamarin"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:automation="using:CalculatorApp.Common.Automation"
|
xmlns:automation="using:CalculatorApp.Common.Automation"
|
||||||
xmlns:controls="using:CalculatorApp.Controls"
|
xmlns:controls="using:CalculatorApp.Controls"
|
||||||
|
@ -12,7 +13,7 @@
|
||||||
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
||||||
AutomationProperties.AutomationId="HistoryList"
|
AutomationProperties.AutomationId="HistoryList"
|
||||||
FlowDirection="LeftToRight"
|
FlowDirection="LeftToRight"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d xamarin">
|
||||||
|
|
||||||
<!-- UNO TODO x:Name="HistoryList"-->
|
<!-- UNO TODO x:Name="HistoryList"-->
|
||||||
|
|
||||||
|
@ -41,6 +42,12 @@
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<converters:ItemSizeToVisibilityNegationConverter x:Key="ItemSizeToVisibilityNegationConverter"/>
|
<converters:ItemSizeToVisibilityNegationConverter x:Key="ItemSizeToVisibilityNegationConverter"/>
|
||||||
<converters:ItemSizeToVisibilityConverter x:Key="ItemSizeToVisibilityConverter"/>
|
<converters:ItemSizeToVisibilityConverter x:Key="ItemSizeToVisibilityConverter"/>
|
||||||
|
<!--Workaround for nventive/Uno#935-->
|
||||||
|
<xamarin:Style x:Key="BodyTextBlockMediumStyle"
|
||||||
|
BasedOn="{StaticResource BodyTextBlockStyle}"
|
||||||
|
TargetType="TextBlock">
|
||||||
|
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}"/>
|
||||||
|
</xamarin:Style>
|
||||||
|
|
||||||
<!--UNO TODO-->
|
<!--UNO TODO-->
|
||||||
<win:MenuFlyout x:Key="HistoryContextMenu">
|
<win:MenuFlyout x:Key="HistoryContextMenu">
|
||||||
|
|
|
@ -170,9 +170,8 @@
|
||||||
<FontIcon FontFamily="{StaticResource CalculatorFontFamily}"
|
<FontIcon FontFamily="{StaticResource CalculatorFontFamily}"
|
||||||
Glyph="" />
|
Glyph="" />
|
||||||
</NavigationViewItem.Icon>
|
</NavigationViewItem.Icon>
|
||||||
<TextBlock Text=""
|
|
||||||
x:Name="AboutText" />
|
<FlyoutBase.AttachedFlyout>
|
||||||
<NavigationViewItem.ContextFlyout>
|
|
||||||
|
|
||||||
<Flyout x:Name="AboutPageFlyout"
|
<Flyout x:Name="AboutPageFlyout"
|
||||||
x:Uid="AboutPageFlyout"
|
x:Uid="AboutPageFlyout"
|
||||||
|
@ -183,7 +182,7 @@
|
||||||
<local:AboutFlyout x:Name="AboutPage"
|
<local:AboutFlyout x:Name="AboutPage"
|
||||||
x:Load="False" />
|
x:Load="False" />
|
||||||
</Flyout>
|
</Flyout>
|
||||||
</NavigationViewItem.ContextFlyout>
|
</FlyoutBase.AttachedFlyout>
|
||||||
</NavigationViewItem>
|
</NavigationViewItem>
|
||||||
</NavigationViewList.Items>
|
</NavigationViewList.Items>
|
||||||
</NavigationViewList>
|
</NavigationViewList>
|
||||||
|
|
|
@ -70,13 +70,6 @@ namespace CalculatorApp
|
||||||
// DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait | DisplayOrientations.PortraitFlipped;
|
// DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait | DisplayOrientations.PortraitFlipped;
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//UNO_TODO /Workaround to have both the Text localisation and the glyph working on all platforms
|
|
||||||
var resourceLoader = Windows.ApplicationModel.Resources.ResourceLoader.GetForCurrentView();
|
|
||||||
if (AboutText != null)
|
|
||||||
{
|
|
||||||
AboutText.Text = resourceLoader.GetString("AboutButton/Content");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -508,7 +501,7 @@ namespace CalculatorApp
|
||||||
this.FindName("AboutPage");
|
this.FindName("AboutPage");
|
||||||
}
|
}
|
||||||
|
|
||||||
AboutButton.ContextFlyout.ShowAt(AboutButton);
|
FlyoutBase.ShowAttachedFlyout(AboutButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnregisterEventHandlers()
|
void UnregisterEventHandlers()
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<Version>4.3.1</Version>
|
<Version>4.3.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Uno.UI">
|
<PackageReference Include="Uno.UI">
|
||||||
<Version>1.45.0-dev.1560</Version>
|
<Version>1.45.0-dev.1595</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||||
<PackageReference Include="Uno.UI" Version="1.45.0-dev.1560" />
|
<PackageReference Include="Uno.UI" Version="1.45.0-dev.1595" />
|
||||||
<PackageReference Include="Uno.Wasm.Bootstrap" Version="1.0.0-dev.281" />
|
<PackageReference Include="Uno.Wasm.Bootstrap" Version="1.0.0-dev.281" />
|
||||||
<DotNetCliToolReference Include="Uno.Wasm.Bootstrap.Cli" Version="1.0.0-dev.276" />
|
<DotNetCliToolReference Include="Uno.Wasm.Bootstrap.Cli" Version="1.0.0-dev.276" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -208,7 +208,7 @@
|
||||||
<PackageReference Include="Newtonsoft.Json">
|
<PackageReference Include="Newtonsoft.Json">
|
||||||
<Version>12.0.2</Version>
|
<Version>12.0.2</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Uno.UI" Version="1.45.0-dev.1560" />
|
<PackageReference Include="Uno.UI" Version="1.45.0-dev.1595" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue