You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the converter to obtain a named resource provokes a NullReferenceException in WindowsCommunityToolkit and an empty string in the Uno.WindowsCommunityToolkit.
Steps to Reproduce
Launch the attached solution in Windows head, a NullReferenceException should be thrown after MainPage.InitializeComponent() is executed. If the xaml with the Converter is commented it does not throw.
Launch the attached solution in WPF/Wasm head, a TextBlock with "Hello World", should be seen. The TextBlock which is using the Converter shows an empty string..
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.
Describe the bug
Using the converter to obtain a named resource provokes a NullReferenceException in WindowsCommunityToolkit and an empty string in the Uno.WindowsCommunityToolkit.
Steps to Reproduce
Launch the attached solution in Windows head, a NullReferenceException should be thrown after MainPage.InitializeComponent() is executed. If the xaml with the Converter is commented it does not throw.
Launch the attached solution in WPF/Wasm head, a TextBlock with "Hello World", should be seen. The TextBlock which is using the Converter shows an empty string..
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.
Environment
NuGet package(s): Uno.WinUI Uno.WinUI 4.4.13, CommunityToolkit.WinUI.UI 7.1.2, Uno.CommunityToolkit.WinUI.UI 7.1.100-dev.15.g12261e2626
OS:
Windows 11 21H2 22000.739
IDE:
Visual Studio 2022
IDE version:
17.3.0 preview 2
Additional context
See the attached file.
ResourceNameToResourceStringConverterIssue.zip
The text was updated successfully, but these errors were encountered: