Невозможно анимировать свойство 'height' в 'system.windows.controls.border' с помощью 'system.windows.media.animation.doubleanimation'
Сделать исключение
Не удается анимировать свойство "высота" в системе".Окна.Управления.Граница" с использованием " системы.Окна.Средства массовой информации.Анимация.DoubleAnimation'
Я думаю, что здесь есть исключение..
<doubleanimation duration="0:0:02.0" from="0" storyboard.targetname="br" storyboard.targetproperty="(FrameworkElement.Height)">
Это исключение:
System.Windows.Media.Animation.AnimationException was unhandled HResult=-2146233087 Message=Cannot animate the 'Height' property on a 'System.Windows.Controls.Border' using a 'System.Windows.Media.Animation.DoubleAnimation'. For details see the inner exception. Source=PresentationCore StackTrace: at System.Windows.Media.Animation.AnimationStorage.OnCurrentTimeInvalidated(Object sender, EventArgs args) at System.Windows.Media.Animation.Clock.FireEvent(EventPrivateKey key) at System.Windows.Media.Animation.Clock.RaiseAccumulatedEvents() at System.Windows.Media.Animation.TimeManager.RaiseEnqueuedEvents() at System.Windows.Media.Animation.TimeManager.Tick() at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget) at System.Windows.Interop.HwndTarget.OnResize() at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) InnerException: System.InvalidOperationException HResult=-2146233079 Message='System.Windows.Media.Animation.DoubleAnimation' cannot use default destination value of 'NaN'. Source=PresentationCore StackTrace: at System.Windows.Media.Animation.DoubleAnimation.GetCurrentValueCore(Double defaultOriginValue, Double defaultDestinationValue, AnimationClock animationClock) at System.Windows.Media.Animation.DoubleAnimationBase.GetCurrentValue(Double defaultOriginValue, Double defaultDestinationValue, AnimationClock animationClock) at System.Windows.Media.Animation.DoubleAnimationBase.GetCurrentValue(Object defaultOriginValue, Object defaultDestinationValue, AnimationClock animationClock) at System.Windows.Media.Animation.AnimationStorage.GetCurrentPropertyValue(AnimationStorage storage, DependencyObject d, DependencyProperty dp, PropertyMetadata metadata, Object baseValue) at System.Windows.Media.Animation.AnimationStorage.OnCurrentTimeInvalidated(Object sender, EventArgs args) InnerException:
Пожалуйста, помогите мне, в чем причина этого исключения.
Что я уже пробовал:
<doubleanimation from="0" ="" storyboard.targetname="br" storyboard.targetproperty="(FrameworkElement.Height)" duration="0:0:02.0">