Exemplo n.º 1
0
        private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
        {
            if (e.ChangedButton != MouseButton.Left || State != LoginAccountState.Normal)
            {
                return;
            }

            var anim = new ThicknessAnimation(new Thickness(8, 8, 8, 5), ButtonDuration);

            MainBorder.BeginAnimation(BorderThicknessProperty, anim);
        }
Exemplo n.º 2
0
        private void Grid_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if (e.ChangedButton != MouseButton.Left || state != LoginAccountState.Normal)
            {
                return;
            }

            Click?.Invoke(this, e);

            var anim = new ThicknessAnimation(new Thickness(5), ButtonDuration);

            MainBorder.BeginAnimation(BorderThicknessProperty, anim);
        }