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

Binding a Font propery of a Label

$
0
0

Hello

I am adding custom cells to my listview and i have some properties already binded, what I am trying to achieve is a Font property binding, when the user clicks on the custom cell it will change a bool flag and change the Font property of the custom cell. (bold when the message hasn't been opened, and normal font when you already saw the message).

I have something like this:

MessageDeatils View

public MessageDetailView(Message aMessage)
        {
if (!aMessage.Seen)
            {
                aMessage.Seen = true;
                App.Database.UpdateMessage(aMessage);
            }...

Custom cell

Tittle.SetBinding(Label.FontProperty, "Seen");

Messages View

foreach (var item in messagesList)
            {
                if (item.Seen == true)
                {
                    //CustomCell.Tittle.Font = Font.SystemFontOfSize(20);
        //Change the font from normal to bold
                }

            }

Any Ideas?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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