I working with an inherited ViewCell and am trying to figure out how to get the text to adjust to the size of the cell. The idea being that I want it to dynamically adjust to the screen size of the device.
`class MenuCell : ViewCell
{
public MenuCell()
{
var imageImg = new Image
{
HorizontalOptions = LayoutOptions.Start,
HeightRequest = 40
};
imageImg.SetBinding(Image.SourceProperty, "ImageUri");
var textLbl = new Label
{
HorizontalOptions = LayoutOptions.FillAndExpand,
BackgroundColor = Color.FromHex("EEEEEE"),
TextColor = Color.FromHex("80A7D8"),
VerticalOptions = LayoutOptions.FillAndExpand
};
textLbl.SetBinding(Label.TextProperty, "ItemText");
var layout = new StackLayout()
{
Orientation = StackOrientation.Horizontal,
Children ={
imageImg,
textLbl
}
};
View = layout;
}
}`