Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

ListView in StackLayout collapses when adding RowHeight in WPF and Mac #6234

Closed
alataffective opened this issue May 21, 2019 · 1 comment
Closed
Labels
a/listview Problems with the ListView/TableView e/6 🕕 6 inactive Issue is older than 6 months and needs to be retested p/macOS p/WPF t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!

Comments

@alataffective
Copy link

Description

When adding RowHeight to a ListView contained in a StackPanel, the ListView collapses vertically.

Steps to Reproduce

  1. Create the following XAML
<ContentPage 
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    x:Class="XamarinExample.MainPage"
    >
    <StackLayout>
        <StackLayout>
            <ListView ItemsSource="{Binding Things}">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <Label Text="{Binding Name}" />
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </StackLayout>
        <StackLayout Orientation="Horizontal">
            <Button Text="One Button"></Button>
            <Button Text="Two Button"></Button>
        </StackLayout>
    </StackLayout>
</ContentPage>
  1. Run the application. The ListView expands vertically to fill the available space.
  2. Add a RowHeight value to the ListView, e.g.
...
            <ListView ItemsSource="{Binding Things}" RowHeight="20">
...

Expected Behavior

The ListView rows have a height corresponding to the RowHeight value but the layout is unchanged.

Actual Behavior

The ListView collapses vertically.

Basic Information

  • Version with issue: 4.0.0.394984-pre10
  • Platform Target Frameworks: WPF, Mac

Screenshots

Without RowHeight
Without RowHeight

With RowHeight
With RowHeight

Reproduction Link

https://github.com/alataffective/ListView-in-StackLayout-collapses-when-adding-RowHeight

@alataffective alataffective added s/unverified New report that has yet to be verified t/bug 🐛 labels May 21, 2019
@pauldipietro pauldipietro added this to New in Triage May 21, 2019
@kingces95 kingces95 moved this from New to Ready For Work in Triage May 23, 2019
@samhouts samhouts moved this from Ready For Work to Needs Estimate in Triage May 23, 2019
@samhouts samhouts added p/WPF a/listview Problems with the ListView/TableView e/6 🕕 6 and removed s/unverified New report that has yet to be verified labels Jul 30, 2019
@samhouts samhouts moved this from Needs Estimate to Ready For Work in Triage Jul 30, 2019
@samhouts samhouts added this to To do in Other Ready For Work Jul 30, 2019
@samhouts samhouts removed this from Ready For Work in Triage Jul 30, 2019
@samhouts samhouts added the inactive Issue is older than 6 months and needs to be retested label Nov 21, 2019
@samhouts samhouts moved this from To do to Inactive in Other Ready For Work May 21, 2020
@samhouts samhouts added help wanted We welcome community contributions to any issue, but these might be a good place to start! up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! and removed help wanted We welcome community contributions to any issue, but these might be a good place to start! labels Jul 17, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts added this to To do in vNext+1 (5.0.0) Aug 14, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@jfversluis
Copy link
Member

Taking into consideration the remaining lifetime of Xamarin.Forms, the platform this is about, the age of this issue and the traction this issue has seen I think it's unlikely that this will get fixed. If it is something that you still would like to have, please consider opening a PR. Thanks!

@jfversluis jfversluis closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2022
Other Ready For Work automation moved this from Inactive to Done Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/listview Problems with the ListView/TableView e/6 🕕 6 inactive Issue is older than 6 months and needs to be retested p/macOS p/WPF t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
Development

No branches or pull requests

5 participants