conceptdev / xamarin-forms-samples

Samples that use Xamarin.Forms (http://xamarin.com/forms)
MIT License
472 stars 659 forks source link

Small change to height calculation #5

Closed MitchMilam closed 9 years ago

MitchMilam commented 10 years ago

Craig I found a couple of small issues with the contain resize calculation, and I corrected one of them.

Height: This line: https://github.com/conceptdev/xamarin-forms-samples/blob/master/Evolve13/Evolve13/Controls/WrapLayout.cs#L159

Needs to be: height = (height + Spacing) * rowCount - Spacing;

Width: There is a remaining issue where the final width of the container is too wide. The fix is to subtract the Spacing from the width, as in:

width -= Spacing;

But, I cannot find the correct place to put that calculation that doesn't involve an incorrect final width.

Later, Mitch