Example #1
0
        public void AnimateExit()
        {
            var exitSb = new StoryBoard();
            foreach (var element in this.elements.Where(e => e.ExitAnimation != null))
            {
                element.ExitAnimation.Duration = this.EntranceDuration;
                exitSb.AddAnimation(element.ExitAnimation);
            }
            if (this.ShadowedAnimationMode != ShadowedAnimationOptions.None)
            {
                exitSb.AddAnimation(new FunctionBasedAnimation(FunctionBasedAnimation.Functions.Linear)
                {
                    Duration = this.EntranceDuration,
                    From = this.ShadowedAnimationMode == ShadowedAnimationOptions.FromRight ? this.offBmp.Width : -this.offBmp.Width * 3,
                    To = this.ShadowedAnimationMode == ShadowedAnimationOptions.FromRight ? -this.offBmp.Width : -this.offBmp.Width * 1,
                    OnAnimation = v => this.shadowImageX = v
                });
            }
            exitSb.AddAnimation(new CommitStoryboardAnimation { Duration = this.EntranceDuration, CommitAction = () => this.ForcedInvalidate() });
            exitSb.AnimateSync();

            if (this.OnExitAnimationCompleted != null)
            {
                this.OnExitAnimationCompleted();
            }
        }
 public ViewControllerContext(StoryBoard storyBoard, NavigationViewController navigationViewController)
 {
     this._storyBoard = storyBoard;
     this._navigationViewController = navigationViewController;
 }
Example #3
0
 public MainWindow()
 {
     InitializeComponent();
     navigationViewController = new NavigationViewController(this, this.NavigationBar);
     storyBoard = new StoryBoard(this,navigationViewController);
 }