Setting the navigation style to Top on the Settings page makes the Gallery app crash
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When changing the navigation from Bottom, for instance, to Top, the WP UI Gallery app crashes.
To Reproduce
- Launch the Gallery app.
- Go to the Settings page
- Change the navigation style to Bottom and wait few seconds.
- Then change it to Top
Expected behavior
The layout of the navigation menu should change without making the application crash.
Screenshots
Obtained exception:
System.InvalidOperationException
HResult=0x80131509
Message='ChevronIcon' name cannot be found in the name scope of 'System.Windows.Controls.ControlTemplate'.
Source=PresentationFramework
StackTrace:
at System.Windows.Media.Animation.Storyboard.ResolveTargetName(String targetName, INameScope nameScope, DependencyObject element) in System.Windows.Media.Animation\Storyboard.cs:line 329
at System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer) in System.Windows.Media.Animation\Storyboard.cs:line 453
at System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer) in System.Windows.Media.Animation\Storyboard.cs:line 453
at System.Windows.Media.Animation.Storyboard.BeginCommon(DependencyObject containingObject, INameScope nameScope, HandoffBehavior handoffBehavior, Boolean isControllable, Int64 layer) in System.Windows.Media.Animation\Storyboard.cs:line 833
at System.Windows.Media.Animation.BeginStoryboard.Begin(DependencyObject targetObject, INameScope nameScope, Int64 layer) in System.Windows.Media.Animation\BeginStoryboard.cs:line 134
at System.Windows.StyleHelper.InvokeActions(TriggerBase triggerBase, DependencyObject triggerContainer, TriggerActionCollection actions, Style style, FrameworkTemplate frameworkTemplate) in System.Windows\StyleHelper.cs:line 2173
at System.Windows.StyleHelper.InvokeDeferredActions(DependencyObject triggerContainer, FrameworkTemplate frameworkTemplate) in System.Windows\StyleHelper.cs:line 2165
at System.Windows.FrameworkElement.ApplyTemplate() in System.Windows\FrameworkElement.cs:line 1721
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3604
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint) in System.Windows.Controls\StackPanel.cs:line 583
at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint) in System.Windows.Controls\StackPanel.cs:line 473
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3604
at System.Windows.UIElement.Measure(Size availableSize)
at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) in MS.Internal\Helper.cs:line 323
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3604
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3604
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Control.MeasureOverride(Size constraint) in System.Windows.Controls\Control.cs:line 607
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3604
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) in System.Windows.Controls\Grid.cs:line 1456
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) in System.Windows.Controls\Grid.cs:line 1424
at System.Windows.Controls.Grid.MeasureOverride(Size constraint) in System.Windows.Controls\Grid.cs:line 1061
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3604
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) in System.Windows.Controls\Grid.cs:line 1456
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) in System.Windows.Controls\Grid.cs:line 1424
at System.Windows.Controls.Grid.MeasureOverride(Size constraint) in System.Windows.Controls\Grid.cs:line 1061
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3604
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Control.MeasureOverride(Size constraint) in System.Windows.Controls\Control.cs:line 607
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3604
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
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 MS.Win32.HwndWrapper.WndProc(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) in System.Windows\Application.cs:line 1539
at System.Windows.Application.RunInternal(Window window) in System.Windows\Application.cs:line 1214
at Wpf.Ui.Gallery.App.Main()
OS version
Windows 10
.NET version
.Net 8
WPF-UI NuGet version
Latest version on the main branch.
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the Gallery app's Settings page and reproduce the switch from Bottom to Top navigation. Inspect the WPF control templates and storyboards involved in the navigation, especially the missing ChevronIcon name; done means the navigation layout changes without the InvalidOperationException or an application crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100