private void BreadCrumbItemLoaded(object sender, RoutedEventArgs e) { if (AnimatesAdd) { MarginLeftAnimation addAnimation = _addAnimation.Clone() as MarginLeftAnimation; addAnimation.TranslationDistance = _animator.ActualWidth; _animator.BeginAnimation(StackPanel.MarginProperty, addAnimation); } }
public void Close() { if (AnimatesClose) { IsClosing = true; MarginLeftAnimation closeAnimation = _closeAnimation.Clone() as MarginLeftAnimation; closeAnimation.TranslationDistance = _animator.ActualWidth; closeAnimation.Completed += new EventHandler(CloseCompleted); _animator.BeginAnimation(StackPanel.MarginProperty, closeAnimation); } else { CloseCompleted(this, null); } }