❔ Unable to bind to list in picker, MAUI
Hi there! I'm trying to bind a list of objects to a picker on a .NET MAUI View (I'm using MVVM) and running into trouble. The XAML page recognizes the list of objects but I cannot seem to access any of the properties such as the Name so that I can display the Name property in the list. So the end result is the proper number of objects in the picker with a blank display value.
The class in question (Model):
the ViewModel retrieves the required data into a List of Langage objects which is an observable property:
and finally the View (it's quite large so I'll truncate to the important parts:
The above code gives an error 'the property 'Name' was not found in type List'1'. but runs anyway. The issue is with the ItemDisplayBinding, it cannot seem to see any of the properties inside the Langs objects. Intellisense will only show me 'Count' and 'Capacity'. I feel like I have everything else in order I just need to know how to get the code to see the Name property so I can populate the picker properly. Any help is greatly appreciated!
1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.