CommunityToolkit / Labs-Windows

A safe space to collaborate and engineer solutions from the prototyping stage all the way through polished finalized component for the Windows Community Toolkit.
Other
339 stars 46 forks source link

Enable pausing/resuming MarqueeText #505

Open Arlodotexe opened 1 year ago

Arlodotexe commented 1 year ago

From https://github.com/CommunityToolkit/Labs-Windows/issues/426:

Hi, I'm using this control in my project currently, I want to implement a feature that when the pointer entered the text start animation, and when pointer exited, the text should be re-placed at the very begin place. is there any way to programmatically achieve this? Or should this be a feature request?

Originally posted by @Lightczx in https://github.com/CommunityToolkit/Labs-Windows/issues/426#issuecomment-1696754039


The resume parameter is for when the speed or control size changes while the animation is running. It is not supposed to be used for pausing or resuming the animation.

In design I intended for the Marquee to not play until StartMarquee is called. This is not the behavior because of line 56 is MarqueeText.Events link, which automatically begins the animation when the container size is changed. I should have left this behavior up to the user.

@Arlodotexe Should I release a patch? It's a technically a small breaking change.

Originally posted by @Avid29 in https://github.com/CommunityToolkit/Labs-Windows/issues/426#issuecomment-1791218986


This is a reasonable scenario to support for MarqueeText. We should look into implementing pause/resume functionality.

Arlodotexe commented 1 year ago

@Avid29 Since you're most familiar with the codebase, would you like to submit a PR for this?

Avid29 commented 1 year ago

@Avid29 Since you're most familiar with the codebase, would you like to submit a PR for this?

Can do