Removed AppBar, OperatorTextBox and OperandTextBox controls (#440)

Fixes #407 
Removed AppBar, OperatorTextBox and OperandTextBox controls
This commit is contained in:
jatinkumar
2019-04-16 20:46:07 -04:00
committed by Daniel Belcher
parent 7a7ceb5888
commit c150cd4ece
14 changed files with 1 additions and 328 deletions

View File

@@ -36,106 +36,7 @@
</DataTemplate>
<!-- TextBox Styles -->
<Style x:Key="OperandTextBoxStyle" TargetType="controls:OperandTextBox">
<Setter Property="MinWidth" Value="32"/>
<Setter Property="MinHeight" Value="20"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="SelectionHighlightColor" Value="{ThemeResource SystemControlBackgroundAccentBrush}"/>
<Setter Property="FontSize" Value="{ThemeResource BodyFontSize}"/>
<Setter Property="IsTextScaleFactorEnabled" Value="False"/>
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="Padding" Value="2,0,3,0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:OperandTextBox">
<Grid x:Name="BackgroundElement" Background="{ThemeResource SystemControlBackgroundAltHighBrush}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Disabled"/>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Target="ContentElement.Foreground" Value="{ThemeResource SystemControlForegroundAccentBrush}"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PointerOver">
<VisualState.Setters>
<Setter Target="BackgroundElement.Background" Value="{ThemeResource SystemControlHighlightListAccentLowBrush}"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Focused">
<VisualState.Setters>
<Setter Target="BackgroundElement.Background" Value="{ThemeResource SystemControlForegroundChromeWhiteBrush}"/>
<Setter Target="ContentElement.Foreground" Value="{ThemeResource SystemControlBackgroundChromeBlackHighBrush}"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<ScrollViewer x:Name="ContentElement"
Padding="{TemplateBinding Padding}"
VerticalAlignment="Center"
AutomationProperties.AccessibilityView="Raw"
HorizontalScrollBarVisibility="Hidden"
HorizontalScrollMode="Disabled"
IsDeferredScrollingEnabled="False"
IsHorizontalRailEnabled="True"
IsTabStop="False"
IsVerticalRailEnabled="False"
VerticalScrollBarVisibility="Disabled"
VerticalScrollMode="Disabled"
ZoomMode="Disabled"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="OperatorTextBoxStyle" TargetType="controls:OperatorTextBox">
<Setter Property="MinWidth" Value="4"/>
<Setter Property="MinHeight" Value="20"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:OperatorTextBox">
<Grid x:Name="BackgroundElement" Background="{ThemeResource SystemControlBackgroundAltHighBrush}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Disabled"/>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Target="textElement.Foreground" Value="{ThemeResource SystemControlPageTextBaseMediumBrush}"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PointerOver">
<VisualState.Setters>
<Setter Target="BackgroundElement.Background" Value="{ThemeResource SystemControlHighlightListAccentLowBrush}"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Focused">
<VisualState.Setters>
<Setter Target="BackgroundElement.Background" Value="{ThemeResource SystemControlBackgroundAccentBrush}"/>
<Setter Target="textElement.Foreground" Value="{ThemeResource SystemControlForegroundChromeWhiteBrush}"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<TextBlock x:Name="textElement"
Margin="0,-2,0,2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="{TemplateBinding Foreground}"
FontSize="16"
IsHitTestVisible="True"
IsTextScaleFactorEnabled="False"
Text="{Binding Token}"
TextAlignment="Center"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="controls:OverflowTextBlock">
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="Template">

View File

@@ -275,13 +275,6 @@ void MainPage::OnPageUnLoaded(_In_ Object^, _In_ RoutedEventArgs^)
// On closing the instance of a window, On Window Consolidate gets fired.
}
void MainPage::PinUnpinAppBarButtonOnClicked(
_In_ Object^ sender,
_In_ RoutedEventArgs^ e)
{
m_model->CalculatorViewModel->OnPinUnpinCommand(sender);
}
void MainPage::SetDefaultFocus()
{
if (m_calculator != nullptr && m_calculator->Visibility == ::Visibility::Visible)

View File

@@ -70,8 +70,6 @@ namespace CalculatorApp
void OnPageLoaded(_In_ Platform::Object^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs^ e);
void OnPageUnLoaded(_In_ Platform::Object^, _In_ Windows::UI::Xaml::RoutedEventArgs^);
void PinUnpinAppBarButtonOnClicked(_In_ Platform::Object^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs^ e);
void EnsureCalculator();
void EnsureConverter();
void EnsureDateCalculator();

View File

@@ -10,8 +10,6 @@
#include "Views/SupplementaryResults.g.h"
#include "Controls/SupplementaryItemsControl.h"
#include "Controls/OperandTextBox.h"
#include "Controls/OperatorTextBox.h"
#include "Controls/HorizontalNoOverflowStackPanel.h"
#include "CalcViewModel/UnitConverterViewModel.h"