mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 22:23:29 -07:00
Fix Programmer calc not loading
This commit is contained in:
parent
aa38e7c4c0
commit
cff29ba285
3 changed files with 20 additions and 7 deletions
|
@ -33,7 +33,7 @@ namespace CalculatorApp.ViewModel
|
||||||
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
private void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName]string p = null) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(p));
|
private void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName]string p = null) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(p));
|
||||||
private StandardCalculatorViewModel m_CalculatorViewModel;
|
private StandardCalculatorViewModel m_CalculatorViewModel /* TODO UNO: Initial nav when not Standard */ = new StandardCalculatorViewModel();
|
||||||
public StandardCalculatorViewModel CalculatorViewModel { get => m_CalculatorViewModel; set { m_CalculatorViewModel = value; RaisePropertyChanged("CalculatorViewModel"); } }
|
public StandardCalculatorViewModel CalculatorViewModel { get => m_CalculatorViewModel; set { m_CalculatorViewModel = value; RaisePropertyChanged("CalculatorViewModel"); } }
|
||||||
|
|
||||||
private DateCalculatorViewModel m_DateCalcViewModel;
|
private DateCalculatorViewModel m_DateCalcViewModel;
|
||||||
|
|
|
@ -478,8 +478,9 @@
|
||||||
|
|
||||||
<!-- Storyboards -->
|
<!-- Storyboards -->
|
||||||
|
|
||||||
<Storyboard x:Name="Animate">
|
<Storyboard x:Key="Animate">
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="NumpadPanel"
|
<!--TODO UNO Storyboard.TargetName="NumpadPanel"-->
|
||||||
|
<DoubleAnimationUsingKeyFrames
|
||||||
Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)">
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)">
|
||||||
<EasingDoubleKeyFrame KeyTime="0"
|
<EasingDoubleKeyFrame KeyTime="0"
|
||||||
Value="0.92">
|
Value="0.92">
|
||||||
|
@ -496,7 +497,8 @@
|
||||||
</EasingDoubleKeyFrame.EasingFunction>
|
</EasingDoubleKeyFrame.EasingFunction>
|
||||||
</EasingDoubleKeyFrame>
|
</EasingDoubleKeyFrame>
|
||||||
</DoubleAnimationUsingKeyFrames>
|
</DoubleAnimationUsingKeyFrames>
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="NumpadPanel"
|
<!--TODO UNO Storyboard.TargetName="NumpadPanel"-->
|
||||||
|
<DoubleAnimationUsingKeyFrames
|
||||||
Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)">
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)">
|
||||||
<EasingDoubleKeyFrame KeyTime="0"
|
<EasingDoubleKeyFrame KeyTime="0"
|
||||||
Value="0.92">
|
Value="0.92">
|
||||||
|
|
|
@ -20,6 +20,7 @@ using Windows.UI.Xaml.Controls.Primitives;
|
||||||
using Windows.UI.Xaml.Data;
|
using Windows.UI.Xaml.Data;
|
||||||
using Windows.UI.Xaml.Input;
|
using Windows.UI.Xaml.Input;
|
||||||
using Windows.UI.Xaml.Media;
|
using Windows.UI.Xaml.Media;
|
||||||
|
using Windows.UI.Xaml.Media.Animation;
|
||||||
using Windows.UI.Xaml.Navigation;
|
using Windows.UI.Xaml.Navigation;
|
||||||
using WindowsCalculator;
|
using WindowsCalculator;
|
||||||
|
|
||||||
|
@ -360,9 +361,12 @@ namespace CalculatorApp
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Once the storyboard that rearranges the buttons completed,
|
// TODO UNO
|
||||||
// We do the animation based on the Mode or Orientation change.
|
private Storyboard Animate => (Storyboard)Resources[nameof(Animate)];
|
||||||
void OnStoryboardCompleted(object sender, object e)
|
|
||||||
|
// Once the storyboard that rearranges the buttons completed,
|
||||||
|
// We do the animation based on the Mode or Orientation change.
|
||||||
|
void OnStoryboardCompleted(object sender, object e)
|
||||||
{
|
{
|
||||||
m_isLastAnimatedInScientific = IsScientific;
|
m_isLastAnimatedInScientific = IsScientific;
|
||||||
m_isLastAnimatedInProgrammer = IsProgrammer;
|
m_isLastAnimatedInProgrammer = IsProgrammer;
|
||||||
|
@ -372,6 +376,13 @@ namespace CalculatorApp
|
||||||
if (m_resultAnimate)
|
if (m_resultAnimate)
|
||||||
{
|
{
|
||||||
m_resultAnimate = false;
|
m_resultAnimate = false;
|
||||||
|
|
||||||
|
// TODO UNO
|
||||||
|
foreach (var animation in Animate.Children)
|
||||||
|
{
|
||||||
|
Storyboard.SetTarget(animation, NumpadPanel);
|
||||||
|
}
|
||||||
|
|
||||||
Animate.Begin();
|
Animate.Begin();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue