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

Button not showing when under a CollectionView in StackLayout on iOS #9164

Closed
zuzannaczaja opened this issue Aug 3, 2022 · 8 comments
Closed
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@zuzannaczaja
Copy link

zuzannaczaja commented Aug 3, 2022

Description

I have problem with Button under CollectionView. When I have Button under CollectionView, button isn't visible.

For example:

    <StackLayout Orientation="Vertical">
        <CollectionView ItemsSource="{Binding ViewModel}"></CollectionView>
        <Button Text="ButtonName"></Button>
    </StackLayout>

When I have CollectionView under Button, button is visible.

For example:

    <StackLayout Orientation="Vertical">
        <Button Text="ButtonName"></Button>
        <CollectionView ItemsSource="{Binding ViewModel}"></CollectionView>
    </StackLayout>

On Windows and Android platform I don't have this problem.

Steps to Reproduce

  1. Create project.
  2. Paste first example to page or view.
  3. Run project on iOS platform.
  4. Replace the first example with a second example.
  5. Run project on iOS platform.

Version with bug

6.0 Release Candidate 2 or older

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 15.5

Did you find any workaround?

No response

Relevant log output

No response

@zuzannaczaja zuzannaczaja added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Aug 3, 2022
@jfversluis jfversluis added area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/iOS 🍎 and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels Aug 3, 2022
@jfversluis
Copy link
Member

You mention 6.0 Release Candidate 2 or older as the version, is that correct? What version of Visual Studio are you using? And what does dotnet --version tell you? Make sure there aren't any updates you still need to install.

@jfversluis jfversluis added the s/needs-info Issue needs more info from the author label Aug 3, 2022
@ghost
Copy link

ghost commented Aug 3, 2022

Hi @zuzannaczaja. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@jfversluis jfversluis changed the title Problem with in Button not showing when under a CollectionView in StackLayout on iOS Aug 3, 2022
@jfversluis
Copy link
Member

Might be related to #9135

@BlagoCuljak
Copy link

Like @jfversluis said, we find the button pushed way down. Set entire stacklayout inside scrollview and then scroll down to empty space, and there is your button.

We are having major issues with this.

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Aug 3, 2022
@zuzannaczaja
Copy link
Author

Like @jfversluis said, we find the button pushed way down. Set entire stacklayout inside scrollview and then scroll down to empty space, and there is your button.

We are having major issues with this.

My version is 6.0.400-preview.22330.6

@hartez hartez added this to the Backlog milestone Aug 4, 2022
@hartez hartez removed the s/needs-attention Issue has more information and needs another look label Aug 4, 2022
@samhouts samhouts added the p/0 Work that we can't release without label Dec 17, 2022
@EdwardMcFlurry
Copy link

Instead of opening a new issue, has this issue being fixed especially on iOS.

@samhouts samhouts modified the milestones: Backlog, .NET 8 Planning Jan 26, 2023
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels May 25, 2023
@XamlTest
Copy link

Verified this on Visual Studio Enterprise 17.7.0 Preview 1.0. Repro on iOS 16.4 with below Project:
9164.zip

@samhouts samhouts modified the milestones: .NET 8 Planning, Under Consideration Sep 27, 2023
@PureWeen PureWeen modified the milestones: Under Consideration, Backlog Aug 2, 2024
@PureWeen PureWeen removed the p/0 Work that we can't release without label Aug 6, 2024
@PureWeen
Copy link
Member

PureWeen commented Aug 6, 2024

StackLayout will by design give infinite space to anything that wants it.

This means the CV will just take infinite space and layout all the controls.

If you need to add constraints then use Grid
https://learn.microsoft.com/en-us/dotnet/maui/migration/layouts?view=net-maui-8.0

@PureWeen PureWeen closed this as not planned Won't fix, can't repro, duplicate, stale Aug 6, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants