Xamarin Forms. Button image size
There is a button. It has a picture on it. The picture is obviously larger than it should be. How do I make the image shrink or grow to the size of the button?
There is a code like this.
<Button Text="Протокол агронома" ImageSource ="ProtocolImage.png" Style="{StaticResource buttonStyle}"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor = .1}"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor = .9}"
RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor = .05}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor = .3}"
ContentLayout="Left, -300"
/>
</RelativeLayout>```
0
Author: maxipunchik, 2020-04-29