microsoft / microsoft/microsoft-ui-xaml

`IconSourceElement.IconSource` can not set to null from a not null value

Open
#10,100 1 comment 0 reactions 0 assignees View on GitHub
area-Icon bug
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

when IconSource is not null, and then set a null to it will raise error: Value dose not fall within a expected range.

### Steps to reproduce the bug

1. Set a not null value to IconSourceElement.IconSource;
2. set a null to IconSourceElement.IconSource.

### Expected behavior

_No response_

### Screenshots

_No response_

### NuGet package version

WinUI 3 - Windows App SDK 1.6.1: 1.6.240923002

### Windows version

Windows 11 (22H2): Build 22621

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in a WinUI 3 app using Windows App SDK 1.6.1 on Windows 11 22H2, setting IconSourceElement.IconSource from a non-null value to null. Then locate the IconSourceElement.IconSource implementation and existing tests. Done means the transition to null no longer raises the reported value-range error and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.