-
Notifications
You must be signed in to change notification settings - Fork 635
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
fix: Update Scroll View Animation Example and Sample Code Presenter #1616
Merged
karkarl
merged 3 commits into
microsoft:main
from
Zakariathr22:scrollview-animation-sample-updates
Nov 13, 2024
Merged
fix: Update Scroll View Animation Example and Sample Code Presenter #1616
karkarl
merged 3 commits into
microsoft:main
from
Zakariathr22:scrollview-animation-sample-updates
Nov 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- **Added Sample Code Files**: - Included three new sample code files for different scroll animations: - `ScrollViewSample3_DefaultAnimation_cs.txt` - `ScrollViewSample3_AccordionAnimation_cs.txt` - `ScrollViewSample3_TeleportationAnimation_cs.txt` - **Updated Sample Code for Scroll Animations**: - Provided sample code for three types of animations (Default, Accordion, Teleportation) to be used in the `ScrollView_ScrollAnimationStarting` method. - **Updated Sample Code for Animation Duration Handling**: - Implemented dynamic updating to ensure that the animation duration is reflected in the displayed sample code when the value changes. - **Updated `ReevaluateVisibility` Method**: - Modified the `ReevaluateVisibility` method in `SampleCodePresenter` to only collapse the visibility when the content is empty. Leave the updated method visibility management to `HandlePresenterVisibility()` only in `ControlExample` to prevent overlap of XAML and C# code.
…nd `GetTargetVerticalOffset` functions to sample codes for better understanding
karkarl
reviewed
Sep 27, 2024
} | ||
if (nbAnimationDuration != null) | ||
Example3.CSharp = Example3.CSharp.Replace("nbAnimationDuration.Value", nbAnimationDuration.Value.ToString()); | ||
Example3.UpdateLayout(); |
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.
nit: indent
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.
Fixed indentation
karkarl
approved these changes
Nov 13, 2024
/azp run |
3 tasks
Zakariathr22
added a commit
to Zakariathr22/WinUI-Gallery
that referenced
this pull request
Nov 26, 2024
Zakariathr22
added a commit
to Zakariathr22/WinUI-Gallery
that referenced
this pull request
Nov 27, 2024
Open
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Updated ScrollView Animation sample to display C# code, include default, accordion, and teleportation animations, and fixed code visibility handling to prevent overlap. With dynamically updated animation duration in the code displayed, main changes are:
Added Sample Code Files:
ScrollViewSample3_DefaultAnimation_cs.txt
-ScrollViewSample3_AccordionAnimation_cs.txt
-ScrollViewSample3_TeleportationAnimation_cs.txt
Updated Sample Code for Scroll Animations:
ScrollView_ScrollAnimationStarting
method.Updated Sample Code for Animation Duration Handling:
Updated
ReevaluateVisibility
Method:ReevaluateVisibility
method inSampleCodePresenter
to only collapse the visibility when the content is empty. Leave the updated method visibility management toHandlePresenterVisibility()
only inControlExample
to prevent overlap of XAML and C# code.Motivation and Context
By adding and updating sample code for different scroll animations (default, accordion, and teleportation), users can better understand and implement various animation styles in their ScrollView components.
It is also fixing this issue: #1603
How Has This Been Tested?
The changes were manually tested by verifying that the correct sample code is displayed for different animations, ensuring dynamic updates to the animation duration in the displayed example code, and confirming that the code presenter visibility is correctly managed.
Screenshots:
Types of changes