-
Notifications
You must be signed in to change notification settings - Fork 653
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
ScrollView - Missing C# code in sample "Programmatic scroll with custom animation" #1603
Labels
help wanted
Extra attention is needed
sample enhancement
Requests for new samples or changes to an existing page
Comments
3 tasks
karkarl
pushed a commit
that referenced
this issue
Nov 13, 2024
…1616) ## 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**: - 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. ## 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: ![image](https://github.com/user-attachments/assets/da75420c-e9d6-41a1-909a-87d7bf87c557) ![image](https://github.com/user-attachments/assets/ebd57015-a6d1-41d3-ba2c-4a4461649386) ![image](https://github.com/user-attachments/assets/53eddded-bff2-4ecf-99f1-67869eed0159) ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [X] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change)
@karkarl This issue can now be closed. |
Seems to be solved by #1616, but still requires to be published to the store. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
help wanted
Extra attention is needed
sample enhancement
Requests for new samples or changes to an existing page
Which version of the app?
WinUI 3 Gallery
Description
The sample "Programmatic scroll with custom animation" on the ScrollView page shows the XAML code but not the required C# code.
Screenshots
Windows version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: