Open
Description
Describe the bug
Using the converter to obtain a named resource provokes a NullReferenceException.
Regression
No response
Reproducible in sample app?
- This bug can be reproduced in the sample app.
Steps to reproduce
Launch the attached solution, a NullReferenceException should be thrown after MainPage.InitializeComponent() is executed. If the xaml with the Converter is commented it does not throw.
The resource is defined in Strings/en/Resources.resw and the same resource name is in a property of the code-behind of MainPage.xaml and x:binded to the Text property of the TextBlock.
Expected behavior
No error should be produced and the string resource should be set to the TextBlock.
Screenshots
No response
Windows Build Number
- Windows 10 1809 (Build 17763)
- Windows 10 1903 (Build 18362)
- Windows 10 1909 (Build 18363)
- Windows 10 2004 (Build 19041)
- Windows 10 20H2 (Build 19042)
- Windows 10 21H1 (Build 19043)
- Windows 11 21H2 (Build 22000)
- Other (specify)
Other Windows Build number
No response
App minimum and target SDK version
- Windows 10, version 1809 (Build 17763)
- Windows 10, version 1903 (Build 18362)
- Windows 10, version 1909 (Build 18363)
- Windows 10, version 2004 (Build 19041)
- Other (specify)
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
Version 17.3.0 Preview 2.0
Device form factor
Desktop
Nuget packages
Microsoft.WindowsAppSDK 1.1.0
CommunityToolkit.WinUI.UI 7.1.2
Additional context
ResourceNameToResourceStringConverterIssueWinUI.zip
Help us help you
No.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
In Progress