Reputation: 178
How to modify the height of the Frame layout. I have tried to set the HeightRequest for the frame, but it doesnt work. Please check the below and attached image.
Frame
Frame frame = new Frame()
{
HasShadow = false,
Margin = new Thickness(10, 0, 0, 10),
BackgroundColor = Color.FromHex("#CDD0D1")
};
Label
Label tag = new Label()
{
TextColor = Color.Black,
FontSize = 14,
};
frame.Content = tag;
Expected Output: My excepted output should be rectangle frame instead of square.
Upvotes: 0
Views: 868
Reputation: 31
Mainly,the frame control in Xamarin is take there own padding in all directions so add padding 0 of frame as:
Frame frame=new Frame{Padding=new Thickness(0)};
Upvotes: 0