diff --git a/src/Calculator.Shared/ViewModels/ApplicationViewModel.cs b/src/Calculator.Shared/ViewModels/ApplicationViewModel.cs index ed6d78a8..a859574a 100644 --- a/src/Calculator.Shared/ViewModels/ApplicationViewModel.cs +++ b/src/Calculator.Shared/ViewModels/ApplicationViewModel.cs @@ -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; diff --git a/src/Calculator.Shared/Views/Calculator.xaml b/src/Calculator.Shared/Views/Calculator.xaml index 0cff7541..43fd6291 100644 --- a/src/Calculator.Shared/Views/Calculator.xaml +++ b/src/Calculator.Shared/Views/Calculator.xaml @@ -478,8 +478,9 @@ - - + + @@ -496,7 +497,8 @@ - + diff --git a/src/Calculator.Shared/Views/Calculator.xaml.cs b/src/Calculator.Shared/Views/Calculator.xaml.cs index d774e013..a73fc6b1 100644 --- a/src/Calculator.Shared/Views/Calculator.xaml.cs +++ b/src/Calculator.Shared/Views/Calculator.xaml.cs @@ -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,9 +361,12 @@ namespace CalculatorApp // } } - // 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) + // 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) { m_isLastAnimatedInScientific = IsScientific; m_isLastAnimatedInProgrammer = IsProgrammer; @@ -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