mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-23 06:25:19 -07:00
Adjust xaml for memory and history
This commit is contained in:
parent
3fbc99db74
commit
8bc564523a
4 changed files with 12 additions and 6 deletions
Binary file not shown.
|
@ -1,5 +1,6 @@
|
|||
<UserControl x:Class="CalculatorApp.HistoryList"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:automation="using:CalculatorApp.Common.Automation"
|
||||
xmlns:controls="using:CalculatorApp.Controls"
|
||||
|
@ -41,11 +42,12 @@
|
|||
<converters:ItemSizeToVisibilityNegationConverter x:Key="ItemSizeToVisibilityNegationConverter"/>
|
||||
<converters:ItemSizeToVisibilityConverter x:Key="ItemSizeToVisibilityConverter"/>
|
||||
|
||||
<MenuFlyout x:Key="HistoryContextMenu">
|
||||
<!--UNO TODO-->
|
||||
<win:MenuFlyout x:Key="HistoryContextMenu">
|
||||
<MenuFlyoutItem x:Uid="DeleteHistoryMenuItem"
|
||||
Click="OnDeleteMenuItemClicked"
|
||||
Icon="Delete"/>
|
||||
</MenuFlyout>
|
||||
</win:MenuFlyout>
|
||||
|
||||
|
||||
<!--
|
||||
|
@ -94,7 +96,7 @@
|
|||
<DataTemplate x:Key="HistoryItemTemplate" x:DataType="model:HistoryItemViewModel">
|
||||
<StackPanel Margin="0,6,4,6"
|
||||
Background="Transparent"
|
||||
ContextFlyout="{StaticResource HistoryContextMenu}">
|
||||
win:ContextFlyout="{StaticResource HistoryContextMenu}">
|
||||
<TextBlock x:Name="ExprTextBlock"
|
||||
Margin="0,0,0,4"
|
||||
HorizontalAlignment="Right"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<UserControl x:Class="CalculatorApp.Memory"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:common="using:CalculatorApp.Common"
|
||||
xmlns:controls="using:CalculatorApp.Controls"
|
||||
|
@ -17,7 +18,8 @@
|
|||
<converters:BooleanToVisibilityNegationConverter x:Key="BooleanToVisibilityNegationConverter"/>
|
||||
<converters:BooleanNegationConverter x:Key="BooleanNegationConverter"/>
|
||||
|
||||
<MenuFlyout x:Key="MemoryContextMenu">
|
||||
<!--UNO TODO-->
|
||||
<win:MenuFlyout x:Key="MemoryContextMenu">
|
||||
<MenuFlyoutItem x:Uid="ClearMemoryMenuItem" Click="OnClearMenuItemClicked">
|
||||
<MenuFlyoutItem.Icon>
|
||||
<FontIcon FontFamily="{StaticResource CalculatorFontFamily}" Glyph=""/>
|
||||
|
@ -33,7 +35,7 @@
|
|||
<FontIcon FontFamily="{StaticResource CalculatorFontFamily}" Glyph=""/>
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
</MenuFlyout>
|
||||
</win:MenuFlyout>
|
||||
|
||||
<DataTemplate x:Key="MemoryItemTemplate" x:DataType="model:MemoryItemViewModel">
|
||||
<local:MemoryListItem Model="{x:Bind Mode=OneWay}"/>
|
||||
|
|
|
@ -35,7 +35,9 @@ namespace CalculatorApp
|
|||
{
|
||||
m_isErrorVisualState = false;
|
||||
InitializeComponent();
|
||||
m_memoryItemFlyout = (MenuFlyout)(Resources["MemoryContextMenu"]);
|
||||
|
||||
// UNO TODO
|
||||
m_memoryItemFlyout = Resources["MemoryContextMenu"] as MenuFlyout ?? new MenuFlyout();
|
||||
|
||||
MemoryPaneEmpty.FlowDirection = LocalizationService.GetInstance().GetFlowDirection();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue