Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Correct XAML pattern to bind element to BindingContext property ('x:Name' binds to page not context)

$
0
0

Hi, I'm new to Xamarin, but I've already built a few pages and have got most of the binding working flawlessly.
I am, however, having an issue figuring out the proper way to bind an element in XAML (a Map to be precise) to a child property of the BindingContext (a ViewModel). I see that the "x:Name" attribute will bind it to a property of the page class, but not the context. All the other binding examples affect values of an element, but not the element object itself.
Is there a way to do this cleanly, or do I have to do what I'm doing now where the page class passes the element (Map) along into the ViewContext manually at startup?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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