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

How can I customize the way binding values are propagated on change?

$
0
0

I'm trying to setup a binding for a Label in a list cell, where the source of the text is a DateTime field on the list item.

var published = new Label();
published.SetBinding(Label.TextProperty, "PublishDate");

The problem is that the label renders the text blank, even though the PublishDate for each item is not empty, which probably means it doesn't convert to the string as it should. Nevertheless, I'd also like to customize the way the date is rendered in the label's title string (the formatting), but I couldn't find a good way to do this using the property bindings. This doesn't seem to be covered in the docs or in the API documentation.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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