Exemplo n.º 1
0
 private void BossImage_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     if (ExpandMoreButton.Content.ToString() == "-")
     {
         ExpandMoreButton.Content = "+";
         DoubleAnimation daH = new DoubleAnimation();
         daH.From     = WindowOv.ActualHeight;
         daH.To       = WindowOv.ActualHeight - 185;
         daH.Duration = new Duration(TimeSpan.FromSeconds(0.3));
         WindowOv.BeginAnimation(Ellipse.HeightProperty, daH);
     }
     else
     {
         if (expanded == 0)
         {
             expanded = 1;
             DoubleAnimation daW = new DoubleAnimation();
             daW.From     = WindowOv.ActualWidth;
             daW.To       = WindowOv.ActualWidth + 227.333;
             daW.Duration = new Duration(TimeSpan.FromSeconds(0.3));
             WindowOv.BeginAnimation(Ellipse.WidthProperty, daW);
         }
         else
         {
             expanded = 0;
             DoubleAnimation daW = new DoubleAnimation();
             daW.From     = WindowOv.ActualWidth;
             daW.To       = WindowOv.ActualWidth - 227.333;
             daW.Duration = new Duration(TimeSpan.FromSeconds(0.3));
             WindowOv.BeginAnimation(Ellipse.WidthProperty, daW);
         }
     }
 }
Exemplo n.º 2
0
 private void ExpandMoreButton_Click(object sender, RoutedEventArgs e)
 {
     if (ExpandMoreButton.Content.ToString() == "+")
     {
         ExpandMoreButton.Content = "-";
         DoubleAnimation daH = new DoubleAnimation();
         daH.From     = WindowOv.ActualHeight;
         daH.To       = WindowOv.ActualHeight + 185;
         daH.Duration = new Duration(TimeSpan.FromSeconds(0.3));
         WindowOv.BeginAnimation(Ellipse.HeightProperty, daH);
     }
     else
     {
         ExpandMoreButton.Content = "+";
         DoubleAnimation daH = new DoubleAnimation();
         daH.From     = WindowOv.ActualHeight;
         daH.To       = WindowOv.ActualHeight - 185;
         daH.Duration = new Duration(TimeSpan.FromSeconds(0.3));
         WindowOv.BeginAnimation(Ellipse.HeightProperty, daH);
     }
 }