-api-id | -api-type |
---|---|
T:Microsoft.UI.Xaml.Controls.AnimatedIconSource |
winrt class |
Represents a shareable object used to create an icon that displays and controls a visual that can animate in response to user interaction and visual state changes.
This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).
Note
AnimatedIconSource
is similar to AnimatedIcon. However, because it is not a FrameworkElement, it can be shared.
You don't set the state directly on an AnimatedIconSource
. Instead, set the AnimatedIcon.State attached property on an ancestor element of the AnimatedIconSource
.
Tip
For more info, design guidance, and code examples, see Animated icon.
[!div class="nextstepaction"] Open the WinUI 2 Gallery app and see the AnimatedIcon in action.
The WinUI 2 Gallery app includes interactive examples of most WinUI 2 controls, features, and functionality. Get the app from the Microsoft Store or get the source code on GitHub.
Animated icon overview, AnimatedVisualPlayer, VisualStateManager, Lottie-Windows, IAnimatedVisual2