private void ControlShopButton_MouseLeave(object sender, MouseEventArgs e) { DoubleAnimation WidthAnimation = new DoubleAnimation(); WidthAnimation.From = ControlShop.Width; WidthAnimation.To = 165; WidthAnimation.Duration = TimeSpan.FromSeconds(0.1); ControlShop.BeginAnimation(Border.WidthProperty, WidthAnimation); }