Fix Programmer calc not loading

This commit is contained in:
Dr.Rx 2019-05-24 13:55:22 -04:00
commit cff29ba285
3 changed files with 20 additions and 7 deletions

View file

@ -33,7 +33,7 @@ namespace CalculatorApp.ViewModel
public event PropertyChangedEventHandler PropertyChanged;
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"); } }
private DateCalculatorViewModel m_DateCalcViewModel;

View file

@ -478,8 +478,9 @@
<!-- Storyboards -->
<Storyboard x:Name="Animate">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="NumpadPanel"
<Storyboard x:Key="Animate">
<!--TODO UNO Storyboard.TargetName="NumpadPanel"-->
<DoubleAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)">
<EasingDoubleKeyFrame KeyTime="0"
Value="0.92">
@ -496,7 +497,8 @@
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="NumpadPanel"
<!--TODO UNO Storyboard.TargetName="NumpadPanel"-->
<DoubleAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)">
<EasingDoubleKeyFrame KeyTime="0"
Value="0.92">

View file

@ -20,6 +20,7 @@ using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;
using WindowsCalculator;
@ -360,6 +361,9 @@ namespace CalculatorApp
// }
}
// TODO UNO
private Storyboard Animate => (Storyboard)Resources[nameof(Animate)];
// 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)
@ -372,6 +376,13 @@ namespace CalculatorApp
if (m_resultAnimate)
{
m_resultAnimate = false;
// TODO UNO
foreach (var animation in Animate.Children)
{
Storyboard.SetTarget(animation, NumpadPanel);
}
Animate.Begin();
}
else