Forum Discussion
SunshineJoe
May 08, 2023Copper Contributor
How to bind data for a user control inside DataTemplate of ListView?
In MAUI, as instructed by https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/contentview?view=net-maui-7.0 doc, we can define user controls for reusability.
However, since it requires specifying Source when binding, I don't know how to bind data for it if it is inside a DataTemplate of ListView.
Here is the link of https://github.com/SunshineSpring666/UserControlInListView . Thanks.
2 Replies
- JamesMontemagno
Microsoft
Checkout the documentation -> https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/contentview which references how to create BindableProperties which should be what you need - Robert DunnCopper ContributorGood question. I have same. anybody have an answer.