Example #1
0
        private MyAnimation CreateFallAnimation(double startTime, double duration)
        {
            var fallAnimation = new MyAnimation
            {
                Name         = "FallAnimation",
                From         = YAxis,
                To           = _configuration.ScreenBottomMargin, //NOTE: Screen bottom margin where names fall off
                BeginTime    = TimeSpan.FromSeconds(startTime),
                Duration     = new Duration(TimeSpan.FromSeconds(duration)),
                PropertyPath = new PropertyPath(Window.TopProperty),
                TargetName   = Border.Name
                               //NOTE: This is how long to go from Y Axis to bottom margin
            };

            return(fallAnimation);
        }
Example #2
0
        private MyAnimation CreateShrinkAnimation(double startTime, double duration)
        {
            var maxFont         = 20;
            var shrinkAnimation = new MyAnimation
            {
                Name         = "ShrinkAnimation",
                From         = maxFont * 2,
                To           = maxFont,
                BeginTime    = TimeSpan.FromSeconds(startTime), // time to begin shrinking
                Duration     = new Duration(TimeSpan.FromSeconds(duration)),
                PropertyPath = new PropertyPath(Control.FontSizeProperty),
                TargetName   = Label.Name
                               // total animation takes to shrink
            };

            return(shrinkAnimation);
        }
Example #3
0
        private MyAnimation CreateGrowAnimation(double startTime, double duration)
        {
            var maxFont = 20;

            //TODO: reset position based on full size label for kiosk
            Label.FontSize = 0.1;
            var growAnimation = new MyAnimation
            {
                Name         = "GrowAnimation",
                From         = startTime,
                To           = maxFont * 2,
                BeginTime    = TimeSpan.FromSeconds(startTime),
                Duration     = new Duration(TimeSpan.FromSeconds(duration)),
                PropertyPath = new PropertyPath(Control.FontSizeProperty),
                TargetName   = Label.Name,
            };

            return(growAnimation);
        }