Share via


AnimatedIconSource Class

Definition

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).

/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AnimatedIconSource : IconSource
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class AnimatedIconSource : IconSource
Public Class AnimatedIconSource
Inherits IconSource
Inheritance
AnimatedIconSource
Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodNameAttribute ContractVersionAttribute MarshalingBehaviorAttribute ThreadingAttribute

Examples

Tip

For more info, design guidance, and code examples, see Animated icon.

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.

Remarks

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.

Constructors

AnimatedIconSource()

Initializes a new instance of the AnimatedIconSource class.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Properties

FallbackIconSource

Gets or sets the static icon to use when the animated icon cannot run.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

FallbackIconSourceProperty

Identifies the FallbackIconSource dependency property.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Foreground

Gets or sets a brush that paints the foreground color of the control.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

(Inherited from IconSource)
MirroredWhenRightToLeft

Gets or sets a value that indicates whether the icon is mirrored when the FlowDirection is RightToLeft.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

MirroredWhenRightToLeftProperty

Identifies the MirroredWhenRightToLeft dependency property.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Source

Gets or sets the animated visual shown by the AnimatedIconSource object.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

SourceProperty

Identifies the Source dependency property.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Methods

CreateIconElement()

Creates an IconSource UI element.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

(Inherited from IconSource)

Applies to

See also