Fixes the layout
This commit is contained in:
parent
6503a111ee
commit
3c07fa7322
2 changed files with 21 additions and 12 deletions
|
|
@ -38,6 +38,20 @@ namespace BookAStar.Views
|
|||
|
||||
public event EventHandler<EventArgs> Edited;
|
||||
|
||||
protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint)
|
||||
{
|
||||
double width = widthConstraint;
|
||||
double height = heightConstraint;
|
||||
|
||||
if (MinimumWidthRequest>0)
|
||||
width = widthConstraint > 80 ? widthConstraint < double.MaxValue ? widthConstraint : MinimumWidthRequest : MinimumWidthRequest;
|
||||
|
||||
if (MinimumHeightRequest > 0)
|
||||
height = heightConstraint > 160 ? heightConstraint < double.MaxValue ? heightConstraint : MinimumHeightRequest : MinimumHeightRequest;
|
||||
|
||||
return base.OnMeasure(width, height);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue