Exemplo n.º 1
0
 private void PopupLogoSelectorOpen()
 {
     if (Math.Abs(PopupLogoSelector.Height) < 1)
     {
         var animation = new DoubleAnimation
         {
             From              = PopupLogoSelector.Height,
             To                = 197,
             Duration          = new Duration(TimeSpan.FromMilliseconds(350)),
             AccelerationRatio = 0.9,
         };
         PopupLogoSelector.BeginAnimation(HeightProperty, null);
         PopupLogoSelector.BeginAnimation(HeightProperty, animation);
     }
 }
Exemplo n.º 2
0
 private void PopupLogoSelectorClose()
 {
     if (PopupLogoSelector.Height > 0.5)
     {
         var animation = new DoubleAnimation
         {
             From              = PopupLogoSelector.Height,
             To                = 0,
             Duration          = new Duration(TimeSpan.FromMilliseconds(350)),
             DecelerationRatio = 0.9,
         };
         PopupLogoSelector.BeginAnimation(HeightProperty, null);
         PopupLogoSelector.BeginAnimation(HeightProperty, animation);
     }
 }