-
-
Notifications
You must be signed in to change notification settings - Fork 875
Enable ui:NavigationView.IsScrollable="False" on Page #1504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements an attached property IsScrollable
for NavigationView that allows disabling scrolling in the NavigationView content presenter. The feature addresses issue #1503 by providing developers control over whether page content should be scrollable within the NavigationView.
- Added
IsScrollable
attached property to control content scrolling behavior - Enhanced NavigationView template parts to locate and manage the content ScrollViewer
- Created demo page showing ListView with disabled NavigationView scrolling
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
NavigationViewContentPresenter.xaml | Added x:Name to content ScrollViewer for programmatic access |
NavigationView.TemplateParts.cs | Added template part definition and logic to find content ScrollViewer |
NavigationView.Navigation.cs | Added scroll behavior update logic when navigating to new content |
NavigationView.AttachedProperties.cs | Implemented IsScrollable attached property definition |
InternalNotifyIconManager.cs | Updated context menu placement using SetCurrentValue |
NotifyIcon.cs | Enhanced DataContext handling for tray icon context menus |
MainWindow.xaml.cs | Added tray menu event handling functionality |
ListViewScrollPage files | Created demo page showcasing the new IsScrollable feature |
MainWindowViewModel.cs | Updated tray menu items with icons and enhanced structure |
ListViewViewModel.cs | Added big array generation for scroll testing |
src/Wpf.Ui.Gallery/Views/Pages/Collections/ListViewScrollPage.xaml.cs
Outdated
Show resolved
Hide resolved
src/Wpf.Ui.Gallery/ViewModels/Pages/Collections/ListViewScrollViewModel.cs
Outdated
Show resolved
Hide resolved
src/Wpf.Ui.Gallery/Views/Pages/Collections/ListViewScrollPage.xaml.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: # 1503
What is the new behavior?
Allows page scrolling to be disabled (use ui:NavigationView.IsScrollable="False"), allowing controls such as ListView and ListBox to automatically use the remaining space and display the scrollbar.
Other information