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

Templates in ListView

$
0
0

Hello everyone,
I have a ListView with DataTemplateSelector and templates with common elements. I want to simplify them by moving common pieces to the base template and reuse them in child templates.

Base template code:

<!-- Label -->

/* Here we put stuff from derivatives */

<!-- Button -->

Child template code:

<!-- Image -->
<!-- Checkbox -->

And visually it will look like:

<!-- Label-->

<!-- Image -->
<!-- Checkbox -->

<!-- Button -->

The same goes for other child templates.

How I can accomplish this?
Previously I tried ContentTemplates/ContentPresentor along with ContentView but that didn't work. It seems that they are designed for ContentPage.

P.S. Order is important.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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