Skip to content

Conversation

@Koichi-Kobayashi
Copy link
Contributor

Pull request type

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

The width of the navigation panel can be specified using OpenPaneLength,
but it cannot be resized dynamically.

I came up with a better approach than my pull request #1519.

What is the new behavior?

The GridSplitter allows users to manually resize the navigation pane width,
and the navigation menu automatically adjusts its width accordingly while
staying left-aligned. The initial width is controlled by the OpenPaneLength property.

  • Add IsGridSplitterEnabled dependency property to enable/disable GridSplitter
  • Implement GridSplitter between navigation pane and content area
  • Ensure navigation pane width resizes with GridSplitter while maintaining left alignment
  • Manage PaneColumn width through code-behind using OpenPaneLength as initial width
  • Remove ColumnDefinition width animations from VisualStateManager to prevent exceptions
  • Add proper event handler cleanup and thread-safe updates using Dispatcher
  • Handle GridLength safely with IsAbsolute checks before accessing Value property
  • Default value is false to maintain backward compatibility

Other information

2025-12-14_01h06_52.mp4

- Add IsGridSplitterEnabled dependency property to enable/disable GridSplitter
- Implement GridSplitter between navigation pane and content area
- Ensure navigation pane width resizes with GridSplitter while maintaining left alignment
- Manage PaneColumn width through code-behind using OpenPaneLength as initial width
- Remove ColumnDefinition width animations from VisualStateManager to prevent exceptions
- Add proper event handler cleanup and thread-safe updates using Dispatcher
- Handle GridLength safely with IsAbsolute checks before accessing Value property
- Default value is false to maintain backward compatibility
@github-actions github-actions bot added controls Changes to the appearance or logic of custom controls. styles Topic is related to styles PR Pull request navigation Changes to navigation related controls. gallery WPF UI Gallery dotnet release labels Dec 13, 2025
pomianowski and others added 2 commits December 16, 2025 12:38
- Add UpdatePaneColumnWidthForToggle method to handle pane open/close events
- Call UpdatePaneColumnWidthForToggle from OnPaneOpened and OnPaneClosed
- Ensure PaneColumn width updates correctly when toggle button is clicked
- Preserve manually resized width when toggling pane open/closed
- Fix issue where pane width was not updating when using GridSplitter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls Changes to the appearance or logic of custom controls. dotnet gallery WPF UI Gallery navigation Changes to navigation related controls. PR Pull request release styles Topic is related to styles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants