fix: Update Scroll View Animation Example and Sample Code Presenter #1616
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