Exemplo n.º 1
0
 public void Hide()
 {
     Animator.BeginDoubleAnimation(
         transform,
         GetDirectionProperty(), GetBeginOffset(),
         easing: EasingFactory.CircleOut);
 }
Exemplo n.º 2
0
        private async void SetMessage(string message, int delay = -1)
        {
            Animator.BeginDoubleAnimation(messageBlock, OpacityProperty, 1, 300);

            messageBlock.Text = message;

            if (delay > 0)
            {
                await SysTask.Delay(delay);

                ClearMessage();
            }
        }
Exemplo n.º 3
0
        public void Show()
        {
            int duration = 300;

            this.Content = contentElement;

            pendingHideTime = DateTime.MaxValue;

            Animator.BeginDoubleAnimation(
                transform,
                GetDirectionProperty(), 0,
                duration,
                EasingFactory.CircleOut);
        }
Exemplo n.º 4
0
        public void Show(MessageLength length)
        {
            int messageLength = (int)length;
            int duration      = 300;

            this.Content = contentElement;

            pendingHideTime = DateTime.Now.AddMilliseconds(messageLength - 50);

            Animator.BeginDoubleAnimation(
                transform,
                GetDirectionProperty(), 0,
                duration,
                EasingFactory.CircleOut,
                async(s, e) =>
            {
                await Task.Delay(messageLength - duration);

                if (pendingHideTime <= DateTime.Now)
                {
                    this.Hide();
                }
            });
        }
Exemplo n.º 5
0
 private void ClearMessage()
 {
     Animator.BeginDoubleAnimation(messageBlock, OpacityProperty, 0, 500);
 }