I have a UI requirement for displaying the user name list like the ones that appear on social media posts for displaying people who liked the post.
The problem in it is the overflow thing.
if it's a single user. Simply display them.
If it's a long list and overflows the label length then out the overflowing user names has to removed and replaced with remaining user count text.
Since I search through web and found no Xamarin Forms way of doing this. I am thinking of creating a custom renderer for this and using native text measuring API to figure the text to be displayed.
var textSize = paint.MeasureText(this.Control.Text);
NSAttributedString nS = new NSAttributedString(txt, font: this.Control.Font); var textSize = nS.Size;
Am I in right path? Is there any other way of doing this?