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

Has anyone confirmed ControlTemplate binding on Xamarin.Forms 3.x ?

$
0
0

I've been fighting this for a couple days now. At first I thought I just wasn't getting the syntax right. But I'm starting to doubt if this works as advertized in XamForm 3.

Pretty basic ControlTemplate for a page so it has a header, body, footer. I'm trying to get the binding to work between the ViewModel that is the BindingContext for a given page with the header. For example, if the VIewModel has a Description of "Fred Flintstone" then that description should appear in the header. Simple enough, right?

The ControlTemplate

The Page

The Header


Now, to me it should be getting Description from the binded VIewModel. But that didn't work. So I added a Description property to the back of the PgHeader.

I figured one or the other would get binded and I could tell which one by the value being shown. Instead neither show up.

The Result

The Description appears on the page but not on the header. To me it should be on the header if the BindingContext is working correctly.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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