microsoft / microsoft/WindowsAppSDK

Widgets: Images flickers when updating widget

Open
#5,574 1 comment 0 reactions 0 assignees View on GitHub
area-External area-Widgets
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

### Describe the bug

Whenever there is some image in an Adaptive Cards / widget JSON and the widget is being update with a new template JSON, the image flickers/flashes.

It doesn't matter what file format is used (jpg/png/svg), or if it's the `url` of an `Image` or the `backgroundUrl` of a `Container` or something else.
It also doesn't matter if it's an actual URL or a data protocol (`data:image/svg`...) or if the URL or image content actual changes

### Steps to reproduce the bug

- Follow guide to implement widget in WinUI app: https://learn.microsoft.com/en-us/windows/apps/develop/widgets/implement-widget-provider-cs
- Provide image in the JSON and update widget with some other change (that doesn't necessarily have to be the image)

Example project: [test.zip](https://github.com/user-attachments/files/20969037/test.zip)

In this example, even the text flickers. When providing a data url, only the image flickers

### Expected behavior

No flashing, the image just changes immediately

### Screenshots

_No response_

### NuGet package version

Windows App SDK 1.7.3: 1.7.250606001

### Packaging type

Packaged (MSIX)

### Windows version

Windows 11 version 24H2 LTSC (26100, June Update)

### IDE

Visual Studio 2022

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the WinUI widget provider guide and the attached test project to reproduce updates containing image URLs or data URLs. Trace the widget JSON update path and compare image and text behavior; done means updating the template no longer causes visible flashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.