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

Is it possible to bind to the Title of a Xarmarin ContentPage?

$
0
0

I have a ContentPage showing some messages, I wish for the page title to dynamically reflect the number of unread messages e.g. 'Messages (5)' indicating the user has 5 unread messages (a useful indicator as the unread messages may have fallen off the bottom of the view)

I was hoping to do something like this:

MyContentPage.BindingContext=App.Instance.ViewModel; MyContentPage.SetBinding(ContentPage.TitleProperty,"UnReadMsgs");

but there appears to be no ContentPage.TitleProperty.

I tried using OnAppearing which is of limited success as the Messages can be updated without the page being reloaded

Would love to have some suggestions on how I can create this functionality in Xamarin Forms


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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