private void animationMessage(UC_ELEMENT_InformationPanel myMessage)
 {
     Storyboard sb = new Storyboard();
     DoubleAnimation myDoubleAnimation = new DoubleAnimation();
     myDoubleAnimation.Duration = new Duration(new TimeSpan(8000000));
     sb.Children.Add(myDoubleAnimation);
     sb.Duration = new Duration(new TimeSpan(8000000));
     Storyboard.SetTarget(myDoubleAnimation, this.hostInformationPanel);
     Storyboard.SetTargetProperty(myDoubleAnimation, new PropertyPath("Height"));
     myDoubleAnimation.From = 0;
     myDoubleAnimation.To = myMessage.Height;
     ElasticEase myEaseFunction = new ElasticEase();
     myEaseFunction.EasingMode = EasingMode.EaseOut;
     myEaseFunction.Springiness = 10;
     myEaseFunction.Oscillations = 2;
     myDoubleAnimation.EasingFunction = myEaseFunction;
     sb.Begin();
 }
 public void DisplayMessageInformation(UC_ELEMENT_InformationPanel myMessage, bool stayAlive = false)
 {
     if (!stayAlive || this.GrilleMessagesInformations.Children.Count == 0)
     {
         AnimateInMessageInformation(myMessage.Height);
     }
     this.GrilleMessagesInformations.Children.Clear();
     this.GrilleMessagesInformations.Children.Add(myMessage);
 }
 private void displayMessage(UC_ELEMENT_InformationPanel myMessage, int displayTime = 0)
 {
     this.hostInformationPanel.Children.Clear();
     this.hostInformationPanel.Children.Add(myMessage);
     animationMessage(myMessage);
 }