Forum Xamarin.Forms

Calculate the maximum label text length

EsegeEsege Member ✭✭

Suppose i have label with a fixed font size in a stacklayout which have a fixed width.

 <StackLayout WidthRequest="200">
     <Label 
        x:Name="MyLabel"
      FontSize="18"></Label>
</StackLayout>

How to calculate the label's maximum length so label fits the stacklayout?

Tagged:

Best Answer

Answers

Sign In or Register to comment.