BitmapImage.IsPlaying Property


Gets a value that indicates whether an animated image is playing.

Equivalent WinUI property: Microsoft.UI.Xaml.Media.Imaging.BitmapImage.IsPlaying.

 property bool IsPlaying { bool get(); };
bool IsPlaying();
public bool IsPlaying { get; }
var boolean = bitmapImage.isPlaying;
Public ReadOnly Property IsPlaying As Boolean

Property Value


true if the animated image is playing; otherwise, false.

Windows 10 requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)


This example shows how to use an animated GIF. A button lets the user start or stop the animation. The IsPlaying property is checked to determine whether the Play or Stop method is called to toggle playback.

The example uses version adaptive code so it can run on all versions of Windows 10. On versions prior to version 1607, the first frame of the GIF is shown, but it is not animated.

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <BitmapImage x:Name="imageSource"

    <AppBarButton x:Name="playButton"
// Play or stop the animated bitmap.
void playButton_Click(object sender, RoutedEventArgs e)
    if (ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Media.Imaging.BitmapImage", "IsPlaying") 
        && imageSource.IsPlaying == true)
        playButton.Icon = new SymbolIcon(Symbol.Play);
        playButton.Icon = new SymbolIcon(Symbol.Stop);


Starting in Windows 10, version 1607, the XAML Image element supports animated GIF images. When you use a BitmapImage as the image Source, you can access BitmapImage API to control playback of the animated GIF image. For more info, see the 'Animated images' section of the BitmapImage class Remarks and the Animated GIF playback sample.

Use the IsPlaying property along with the Play and Stop methods to control the playback of an animated bitmap.

Compatibility notes

If your app runs on releases of Windows 10 prior to version 1607, you must use the ApiInformation class to check for the presence of this property before you use it. For more info, see Version adaptive code: Use new APIs while maintaining compatibility with previous versions.

Applies to