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
323 stars 44 forks source link

🧪 [Experiment] Shimmer #390

Open niels9001 opened 1 year ago

niels9001 commented 1 year ago

Approved from Discussion

https://github.com/CommunityToolkit/Labs-Windows/discussions/381

Problem Statement

A way to indicate to the user that certain parts of the screen are loading.

Overview

This experiment adds the following components:

Using

You can try it out via the NuGet Packages here:

UWP https://dev.azure.com/dotnet/CommunityToolkit/_artifacts/feed/CommunityToolkit-Labs/NuGet/CommunityToolkit.Labs.Uwp.Shimmer WinUI 3 https://dev.azure.com/dotnet/CommunityToolkit/_artifacts/feed/CommunityToolkit-Labs/NuGet/CommunityToolkit.Labs.WinUI.Shimmer

Read more about Preview Packages here.

Code

<labs:Shimmer Width="96" Height="96" />

Result Shimmer

Docs & samples https://github.com/CommunityToolkit/Labs-Windows/blob/main/components/Shimmer/samples

Additional info

TO DO

FUTURE

Implementation Requirements

Tested Platforms

Technical Review

Community Help?

Yes

dpaulino commented 1 year ago

I'm using this and it works great. Question tho: how to make a perfectly round shimmer?

JohnnyWestlake commented 4 months ago

Suggestion: turn this into a Brush instead, allowing all instances to share the same internal composition animation and brush to optimise performance and resource usage (rather than every single usage creating it's own brushes and animations).

Logic and internal implementation would largely stay the same.