-
-
Notifications
You must be signed in to change notification settings - Fork 780
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
Added UseScroller property to NavigationView to control IsDynamicScrollViewerEnabledProperty #776
Conversation
…llViewerEnabledProperty of NavigationViewContentPresenter
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Akizon77 on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
@@ -167,7 +167,7 @@ protected virtual void OnNavigated(NavigationEventArgs eventArgs) | |||
return; | |||
} | |||
|
|||
IsDynamicScrollViewerEnabled = ScrollViewer.GetCanContentScroll(dependencyObject); | |||
//IsDynamicScrollViewerEnabled = ScrollViewer.GetCanContentScroll(dependencyObject); |
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.
//IsDynamicScrollViewerEnabled = ScrollViewer.GetCanContentScroll(dependencyObject); |
@@ -24,10 +24,10 @@ | |||
<Setter Property="Padding" Value="0" /> | |||
<Setter Property="OpenPaneLength" Value="320" /> | |||
<Setter Property="CompactPaneLength" Value="40" /> | |||
<Setter Property="ScrollViewer.CanContentScroll" Value="False" /> | |||
<!--<Setter Property="ScrollViewer.CanContentScroll" Value="False" /> |
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.
If unnecessary, it is better to remove it.
@@ -15,6 +15,22 @@ namespace Wpf.Ui.Controls; | |||
|
|||
public partial class NavigationView | |||
{ | |||
/// <inheritdoc/> |
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.
This inheritdoc
does not lead to anything, it has no documentation in INavigationView
. Additionally, it has no equivalent in WPF or Win UI. Which makes the name quite unintuitive.
This functionality already exist and used in |
Added UseScroller property to NavigationView to control IsDynamicScrollViewerEnabledProperty of NavigationViewContentPresenter(NVCP).(I conflicted with NVCP DynamicScrollViewer when designing ItemsControls. I tried many methods but failed to solve it (including adding UseScroller attribute, the state was not passed to NVCP). Finally, I found IsDynamicScrollViewerEnabled = ScrollViewer.GetCanContentScroll() by downloading the source code and debugging continuously;(NavigationViewContentPresenter.cs,Line 177) only to find out that you have considered this situation. Navigation documentation only describes how to navigate, no more detailed information, plus I have not considered the need to add AP to the Page, so I spent the whole day debugging and thinking.
Although I am a beginner of WPF, I think Frame should default without ScrollViewer. Previously, when doing some Win UI3 projects, Frame is without ScrollViewer, just a Frame.
The WPF UI project is one of my favorite open source projects, and I learned a lot from its source code (there is almost no systematic C#teaching in our country, let alone WPF). I hope this project gets better and better, and I hope to contribute to the community with my limited knowledge.