Esempio n. 1
0
        public void ShowDialog(Control dialog, int dialogWidth, int dialogHeight)
        {
            if (currentDialog != null)
            {
                RemoveChild(currentDialog);
            }

            this.currentDialog = dialog;
            this.dialogWidth   = dialogWidth;
            this.dialogHeight  = dialogHeight;

            currentDialog.HtmlElement.Style.Opacity = "0";

            AppendChild(currentDialog);

            UpdateLayout();

            ITransition dialogAppearTransition = new ParallelTransition(
                new Transition(currentDialog.HtmlElement, "opacity", new DoubleValueBounds(0, 1), new TransitionTiming(200), 200),
                new Transition(currentDialog.HtmlElement, "margin", new ValueBounds("-20px 0px 0px 0px", "0px 0px 0px 0px"), new TransitionTiming(400, TimingCurve.EaseOut), 200));

            disappearTransition.Stop();
            appearTransition.Start();
            dialogAppearTransition.Start();
        }
Esempio n. 2
0
        public void StartAppearAnimation()
        {
            ITransition animation = new ParallelTransition(
                new MultiplePropertyTransition(HtmlElement, new[] { "transform", "-webkit-transform" }, new ScaleValueBounds(0, 1), new TransitionTiming(400)),
                new Transition(HtmlElement, "opacity", new DoubleValueBounds(0, 1), new TransitionTiming(400))
                );

            animation.Start();
        }
Esempio n. 3
0
        public void StartDisappearAnimation()
        {
            ITransition animation = new ParallelTransition(
                new Keyframe(Shadow.HtmlElement, "visibility", "hidden"),
                new MultiplePropertyTransition(HtmlElement, new[] { "transform", "-webkit-transform" }, new ScaleValueBounds(1, 0), new TransitionTiming(400)),
                new Transition(HtmlElement, "opacity", new DoubleValueBounds(1, 0), new TransitionTiming(400))
                );

            animation.Start();
        }