[Desktop] Unexpected null value passed to ItemTemplateSelector when used on Canvas #18693
Labels
difficulty/medium 🤔
Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI
kind/bug
Something isn't working
project/items 🧾
Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)
Current behavior
Create
canvas
that displays two types of objectsItemA
andItemB
and define aItemTemplateSelector
with twoDataTemplates
for both item types:This works fine on
WindowsSDK
Framework:But on
Desktop
Framework theItemTemplateSelector
unexpectedly getsnull
as an item reference where onlyItemA
andItemB
are expected.Expected behavior
null
shall never be passed to theItemTemplateSelector
How to reproduce it (as minimally and precisely as possible)
STEPS TO REPRODUCE:
MINIMAL REPRO PROJECT: UnoTemplateSelectorOnCanvasApp.zip
Workaround
handle null value in
ItemTemplateSelector
:null => null,
Works on UWP/WinUI
Yes
Environment
No response
NuGet package version(s)
"Uno.Sdk": "5.5.32"
Affected platforms
Skia (WPF)
IDE
Visual Studio 2022
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: