Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at iNKORE.UI.WPF.Modern.Controls.Helpers.ExpanderAnimationsHelper.UpdateLayout(FrameworkElement contentControl)
at iNKORE.UI.WPF.Modern.Controls.Helpers.ExpanderAnimationsHelper.AnimateCollapse(Expander expander)
at iNKORE.UI.WPF.Modern.Controls.Helpers.ExpanderAnimationsHelper.RunExpanderAnimation(Expander expander)
at iNKORE.UI.WPF.Modern.Controls.Helpers.ExpanderAnimationsHelper.<>c__DisplayClass12_0.<OnIsEnabledChanged>g__TriggerExpandAnimationOnLoad|0(Object sender, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, 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)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at Test.App.Main()
Describe the bug
如题。
先在一个
ContentDialog里头塞个Expander,然后给他的Style设置{StaticResource {x:Static ui:ThemeKeys.ExpanderCardStyleKey}},然后show一下就抛异常了Place an Expander inside a ContentDialog, then set its
Styleto{StaticResource {x:Static ui:ThemeKeys.ExpanderCardStyleKey}}, and aNullReferenceExceptionis thrown when the dialog is shown.堆栈信息 / Stack info
Reproduction
App.zip
just run the project and click the button in the center of the window
Suggested Solution
No response
Library Version
0.10.2
Operating System
Windows 11
Framework
.NET Core and .NET
Framework Version
8.0.22
Source of Package
NuGet.org (Package)
Additional Notes
UI.WPF.Modern/source/iNKORE.UI.WPF.Modern/Controls/Helpers/ExpanderAnimationsHelper.cs
Line 192 in be7b6a3
感觉是这个的问题?🤔
Validations