Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Creating a ContentView (UserControl) and using a DataTemplate

$
0
0

WARNING: Windows Phone speak below

I'm creating custom ContentView and am trying to do the equivalent of TemplateBinding in a ContentTemplate to a DataTemplate in a ContentControl. Creating Bound properties appears to very similar to creating DependencyProperties. But I'm getting an error: DataTemplate is not a BindableObject I've tried assigning the DataTemplate to another ContentView.Content, but that fails as well - Cannot implicitly convert type 'Xamarin.Forms.DataTemplate' to 'Xamarin.Forms.View

Is what I'm trying to do impossible in XF or has someone figured out a way to assign a DataTemplate to something other than an IEnumerable List's ItemTemplate?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>