Example #1
0
        private void Box_MouseLeave(object sender, MouseEventArgs e)
        {
            Rectangle box = sender as Rectangle;

            HoverTextChanged.Invoke(this, new TextEventArgs(""));

            box.BeginAnimation(Rectangle.MarginProperty, new ThicknessAnimation(new Thickness(0, 0, 0, 0), new Thickness(0, _growth, 0, _growth), TimeSpan.FromSeconds(0.1)));
            box.BeginAnimation(Rectangle.WidthProperty, new DoubleAnimation(IconWidth + _growth, IconWidth, TimeSpan.FromSeconds(0.1)));
            box.BeginAnimation(Rectangle.HeightProperty, new DoubleAnimation(IconHeight + _growth, IconHeight, TimeSpan.FromSeconds(0.1)));
        }
Example #2
0
        private void Box_MouseEnter(object sender, EventArgs e)
        {
            Rectangle box = sender as Rectangle;

            HoverTextChanged.Invoke(this, new TextEventArgs(box.Name));

            box.BeginAnimation(Rectangle.MarginProperty, new ThicknessAnimation(new Thickness(0, GrowthAmount, 0, GrowthAmount), new Thickness(0, 0, 0, 0), TimeSpan.FromSeconds(0.1)));
            box.BeginAnimation(Rectangle.WidthProperty, new DoubleAnimation(IconWidth, IconWidth + GrowthAmount, TimeSpan.FromSeconds(0.1)));
            box.BeginAnimation(Rectangle.HeightProperty, new DoubleAnimation(IconHeight, IconHeight + GrowthAmount, TimeSpan.FromSeconds(0.1)));
        }