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

Extending ContentView with "templated" layout

$
0
0

I'm thinking about how to apply some template to each page, or better, to a layout.
Imagine you have few pages and each of them having a button at the bottom and a label on the top (just for the sample's sake). The rest is custom content.
Even more simplified than the above, I am thinking of a layout like:



where out of the box ContentView does only:

One of the way this would be possible is by inheriting ContentView and hack it a bit - because it has only Content property and it is difficult to combine the template and the actual content.

Basically if Xamarin provided a way to combine template and content like XAML does through i.e. ControlTemplate it'd be awesome. Or just some virtual methods that would allow that cleanly.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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