Labs-Windows icon indicating copy to clipboard operation
Labs-Windows copied to clipboard

[Feature] Marquee Text Control

Open Avid29 opened this issue 3 years ago • 1 comments

Adds a new MarqueeText control that scrolls text across the screen as a Marquee.

https://user-images.githubusercontent.com/9384045/190292642-e187f29e-8024-4906-bcb0-368544dafc85.mp4

Avid29 avatar Sep 15 '22 15:09 Avid29

Sorry for the resubmit. I realized the base branch name was wrong

Avid29 avatar Sep 15 '22 15:09 Avid29

@Avid29 Awesome work :)! FYI, I've added the win: prefix for FontStretch (as it's not supported for Uno) so that the build will hopefully pass!

niels9001 avatar Nov 11 '22 10:11 niels9001

So the current issue appears to be that in Uno (and only in Uno) Timeline is IDisposible, and therefore the MarqueeText control must also be IDisposible since it contains a Storyboard. However in UWP there's no reason to make the control IDisposible, so I'm really not tempted to just add that interface for no reason. For now, I have conditionally attached a IDisposible for Uno, but I'm not too happy with this solution. image

Any better ideas?

Avid29 avatar Nov 25 '22 14:11 Avid29

@Avid29 was there a warning message about this or something somewhere calling this out?

@jeromelaban is this IDisposable message a red herring, are we missing something else instead?

michael-hawker avatar Nov 29 '22 17:11 michael-hawker

Some objects are marked as disposable for internal constraints, but it's not something we can change right away as it may be a breaking change (we'll take note to add it as such for our next major). Having to add IDisposable here is likely a result of some analyzer that can be disabled for Uno targets specifically.

jeromelaban avatar Nov 29 '22 18:11 jeromelaban

Hmm. That's frustrating. It fails with IDisposable because it's redundant, and it fails without IDisposible because it's missing...

Avid29 avatar Nov 29 '22 18:11 Avid29

Having to add IDisposable here is likely a result of some analyzer that can be disabled for Uno targets specifically.

@Avid29 See if you can find which analyzer is doing that. Since IDisposable is implemented as an internal constraint to Uno, we can effectively ignore this and disable the analyzer on uno platforms.

Arlodotexe avatar Jan 17 '23 17:01 Arlodotexe

Having to add IDisposable here is likely a result of some analyzer that can be disabled for Uno targets specifically.

@Avid29 See if you can find which analyzer is doing that. Since IDisposable is implemented as an internal constraint to Uno, we can effectively ignore this and disable the analyzer on uno platforms.

Partially fixed in #377, but since MarqueeText still owns the field, we need to manually suppress the error in this file. There's no way to suppress this problem globally for all files without sacrificing functionality.

Arlodotexe avatar Feb 24 '23 19:02 Arlodotexe

@niels9001 I believe this is just waiting on your approval, right @Arlodotexe?

Avid29 avatar Mar 02 '23 02:03 Avid29

@niels9001 I believe this is just waiting on your approval, right @Arlodotexe?

2 minor comments.. otherwise looking great 😁! Awesome control!

niels9001 avatar Mar 02 '23 05:03 niels9001