Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] BoxView not reporting correct size #1922

Closed
davidortinau opened this issue Aug 3, 2021 · 1 comment · Fixed by #1923
Closed

[Bug] BoxView not reporting correct size #1922

davidortinau opened this issue Aug 3, 2021 · 1 comment · Fixed by #1923
Assignees
Labels
fixed-in-6.0.100-preview.7.3 Look for this fix in 6.0.100-preview.7.3!

Comments

@davidortinau
Copy link
Contributor

Description

using System;
using Microsoft.Maui;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Graphics;

namespace LayoutLab
{	public class SpacingStackPage : ContentPage
	{
		public SpacingStackPage()
		{
            BackgroundColor = Colors.White;
            this.Content = new StackLayout
            {
                Margin = new Thickness(100),
                Spacing = 0,
                Children =
                {
                    new Label { Text = "Primary colors" },
                    new BoxView { Color = Colors.Red },
                    new BoxView { Color = Colors.Yellow },
                    new BoxView { Color = Colors.Blue },
                    new Label { Text = "Secondary colors" },
                    new BoxView { Color = Colors.Green },
                    new BoxView { Color = Colors.Orange },
                    new BoxView { Color = Colors.Purple }
                }
            };
		}
	}
}

Expected Behavior

Screen Shot 2021-04-15 at 1 33

Actual Behavior

Minus the title bar issue...

Screen Shot 2021-08-03 at 9 19 46 AM

If I give a BoxView an explicit size, it'll appear.

Screen Shot 2021-08-03 at 9 23 35 AM

Basic Information

  • Version with issue: pre7

Reproduction Link

https://github.com/davidortinau/ControlGallery/blob/main/src/ControlGallery/Pages/Stack/SpacingStackPage.cs

@hartez
Copy link
Contributor

hartez commented Aug 3, 2021

So what you're saying is that BoxView is broken.

@hartez hartez changed the title [Bug] StackLayout not sizing all children [Bug] BoxView not reporting correct size Aug 3, 2021
hartez added a commit that referenced this issue Aug 3, 2021
…uplicate

legacy BoxView default size behavior

Fixes #1922
@ghost ghost locked as resolved and limited conversation to collaborators Feb 19, 2022
@samhouts samhouts added the fixed-in-6.0.100-preview.7.3 Look for this fix in 6.0.100-preview.7.3! label Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-6.0.100-preview.7.3 Look for this fix in 6.0.100-preview.7.3!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants