<Label x:Name="mainLabel"
Grid.Row="0"
Grid.Column="0"
FontSize="50"
Grid.ColumnSpan="3"
Grid.RowSpan="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand" />
I am making a phone dialing interface and i have a label that outputs the numbers that are pressed.
Question: How can I make the font size of the label decreases and increases depending on the numbers typed so that it will fit on the label?
I tried googling all day but all the samples are outdated.
I am using the latest version of Xamarin and android API 27
.
You can have a FontSize with a binding property set for the Label.
eg:
You can have a TextChanged event triggered for the label where you check the length of label text goes above a value change to desired size and also for a length less than a value.
TextChanged event for Label can be implemented as mentioned in this link