Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WinUI] ItemsSource="ABCD" or ItemsSource="1234" throwing XamlParseException #8696

Closed
agneszitte opened this issue Aug 1, 2023 · 2 comments
Labels
bug Something isn't working team-Markup Issue for the Markup team

Comments

@agneszitte
Copy link
Contributor

agneszitte commented Aug 1, 2023

Describe the bug

Using ItemsSource="ABCD" or ItemsSource="1234" for example as a quick ItemsSource during tests, throw a XamlParseException on WinUI. (As opposed to building fine on UWP)

Exception thrown: 'Microsoft.UI.Xaml.Markup.XamlParseException' in WinRT.Runtime.dll
WinRT information: Failed to assign to property 'Microsoft.UI.Xaml.Controls.ItemsControl.ItemsSource'. [Line: 16 Position: 17]
XAML parsing failed.

Steps to reproduce the bug

Try this snippet of code in a WinUI app:

	<StackPanel>
		<ItemsControl ItemsSource="ABCDEFG" />
		<ComboBox ItemsSource="ABCDEFG" />
		<ItemsControl ItemsSource="123456" />
		<ComboBox ItemsSource="123456" />
		<ItemsControl ItemsSource="@#$%?!" />
		<ComboBox ItemsSource="@#$%?!" />
	</StackPanel>

Expected behavior

There should be no XamlParseException like for UWP

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.3.3: 1.3.230724000

Windows version

Windows 10 (21H2): Build 19044

Additional context

I did not find a similar issue opened so I added this one. This is really useful to have on hand for quick tests.

@agneszitte agneszitte added the bug Something isn't working label Aug 1, 2023
@bpulliam bpulliam added the team-Markup Issue for the Markup team label Aug 9, 2023
@brabebhin
Copy link

As long as there's a readable error in the output this is actually fine - such a situation is obviously bogus and should be hunted down. One of the annoying parts of UWP was having to track down such weird XAML lines (usually typos) when things suddenly stopped working.

@JesseCol
Copy link

JesseCol commented Feb 6, 2024

Thanks! This is currently by-design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

4 participants