private void AlignLoseHealthAnimation(LoseHealthAnimation animation, Image bloodDrop) { UpdateLayout(); Point leftTop = bloodDrop.TranslatePoint(new Point(0, 0), canvasRoot); animation.Width = 50; animation.Height = 120; animation.SetValue(Canvas.LeftProperty, leftTop.X - 10); animation.SetValue(Canvas.TopProperty, leftTop.Y -100); }
private void AlignLoseHealthAnimation(LoseHealthAnimation animation,Image bloodDrop) { UpdateLayout(); Point leftBottom = bloodDrop.TranslatePoint(new Point(0, bloodDrop.ActualHeight), canvasRoot); animation.Width = 50; animation.Height = 120; animation.SetValue(Canvas.LeftProperty, leftBottom.X - 8); animation.SetValue(Canvas.BottomProperty, leftBottom.Y - 18); }