DYN-9078: Node context menu chevron doesn't change color on hover#17124
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9078
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates WPF context-menu styling so submenu arrows remain visible (white) when hovering or when the submenu is open, improving menu readability and consistency.
Changes:
- Set submenu arrow foreground to white on
IsMouseOver=Truein multiple menu templates/styles. - Add
IsSubmenuOpen=Truetriggers so the arrow stays white while the submenu is open. - Align annotation submenu arrow visuals by setting transform origin and explicitly toggling arrow foreground on hover enter/leave.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/DynamoCoreWpf/Views/Core/WorkspaceView.xaml | Adds submenu-arrow foreground setters for hover and submenu-open states. |
| src/DynamoCoreWpf/Views/Core/NodeView.xaml.cs | Adds code-behind trigger/setter for submenu arrow and introduces an IsSubmenuOpen trigger. |
| src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs | Adjusts submenu arrow transform origin and explicitly changes arrow foreground on hover. |
| src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml | Applies the same submenu arrow hover/open foreground behavior across Modern theme templates. |
| var isSubmenuOpenTrigger = new Trigger | ||
| { | ||
| Property = MenuItem.IsSubmenuOpenProperty, | ||
| Value = true | ||
| }; | ||
| isSubmenuOpenTrigger.Setters.Add(new Setter(Label.ForegroundProperty, Brushes.White, "subMenuArrow")); |
| Value = true | ||
| }; | ||
| isMouseOverTrueTrigger.Setters.Add(new Setter(TextBlock.ForegroundProperty, Brushes.White, "ContentPresenter")); | ||
| isMouseOverTrueTrigger.Setters.Add(new Setter(Label.ForegroundProperty, Brushes.White, "subMenuArrow")); |
There was a problem hiding this comment.
Now addresses, although it seem that subMenuArrow might be created as a Label on purpose. The rest of that block already uses Label.MarginProperty, Label.ContentProperty etc, so the code is already label-only.
| Property = MenuItem.IsSubmenuOpenProperty, | ||
| Value = true | ||
| }; | ||
| isSubmenuOpenTrigger.Setters.Add(new Setter(Label.ForegroundProperty, Brushes.White, "subMenuArrow")); |
There was a problem hiding this comment.
Now addressed with the same comment as above.
| <Trigger Property="IsMouseOver" Value="True"> | ||
| <Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="White" /> | ||
| <Setter TargetName="subMenuArrow" Property="Foreground" Value="White" /> | ||
| <Setter TargetName="dockPanel" Property="Background" Value="{StaticResource GenericMouseOverBackgroundColorBrush}" /> | ||
| </Trigger> | ||
| <Trigger Property="IsSubmenuOpen" Value="True"> | ||
| <Setter TargetName="subMenuArrow" Property="Foreground" Value="White" /> | ||
| </Trigger> |
There was a problem hiding this comment.
I have intentionally kept the existing structure. The comment makes sense, but pulling shared styles seems like a big refactor and IMO is best done in a separate PR.
|
Co-authored-by: Ivo Petrov <ivaylo-matov@users.noreply.github.com>
This reverts commit 9343686.
jasonstratton
left a comment
There was a problem hiding this comment.
Looks good! Thank you!



Purpose
This PR addresses DYN-9078.
In node, workspace, and group context menus, items that open a submenu show a small blue > on the right. When you hover those items or open the submenu the arrow stayed blue.
This PR updates the styling so the arrow turns white in the same situations. It also fixes the same behavior for group context menus, and aligns the group menu chevron vertically without making the rows taller.
Before:
After:
Declarations
Check these if you believe they are true
Release Notes
Context menu items with submenus now show a white chevron when hovered or expanded, matching the menu label. Group context menus are included.
Reviewers
@DynamoDS/eidos
@jasonstratton
@zeusongit
FYIs
@dnenov
@johnpierson