Open Quasimodo6 opened 1 year ago
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 2.0. Can repro on android and windows platform with sample project. TestXamlBindings-master.zip
Description
If you have a Dictionary with an self created enum as key, and try to bind this to an entry element in xaml, you can not start this app, nor does the intellisense nor the compiler give you any meaningful errormessage, you only get a "Object reference not set to an instance of an object" in the error list.
If you change from Dictionary<yourEnum, yourObject> to Dictionary<string, yourObject> it runs like a charme.
Steps to Reproduce
Add a public enum to the mainpage.xaml.cs:
Add a public Dictionary<yourEnum, typeYouLike> to the mainpage.xaml.cs
Initialize your Dictionary in the mainpage constructor:
**8. Why is this a bug:
Link to public reproduction project repository
https://github.com/Quasimodo6/TestXamlBindings
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows
Affected platform versions
net7.0-windows10.0.19041.0
Did you find any workaround?
nope, i have wasted days and days on this $!"§$!** xaml bindings and red hours over hours in stackoverflow and other sources, without any success. finally i decided to start a clean new project and check, if it is a problem in front of the monitor or behind ;) turns out: it simply doesn't work as expected.
Relevant log output