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

ContentView ItemTemplateSelector (No listView)

$
0
0

Hi, I'm trying to work with a ContentView that can have different template based on a parameter. In my case, depends on the language, I will have a different template. Every sample I've found on the web is talking about ListView. I still can do that with a listview but what's the point if I have only one row...

At the moment, I have a public class DataTemplateSelector, and a public class CountryTemplateSelector that inherits from DataTemplateSelector.

I'm sure someone already developped such a control and could provide me some help. What's the best implementation ?

<ctrls:CountryTemplateSelector x:Key="TemplateSelector"
                                DataTemplateES="{StaticResource TemplateES}"
                                DataTemplateFR="{StaticResource TemplateFR}"
                                DataTemplateIT="{StaticResource TemplateIT}"/>

Here is the link I've bookmarked :

https://oren.codes/2014/12/31/datatemplateselector-for-xamarin-forms
https://forums.xamarin.com/discussion/comment/57207#Comment_57207
https://forums.xamarin.com/discussion/46990/datatemplateselector-xamarin-forms


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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