Why doesn't this listview adjust her height?

ArccexArccex DEMember

public EventsPage ()
{

        Title="   Events";

        Methods.events.Add (new Event{id="1", germanDisplayName="ViaThea", polishDisplayName="1", date=DateTime.Now, isFavourite=true, description="...",imageUrl="url", location="loc"});

        ...

        Methods.sortEvents ();
        Methods.groupEvents ();

        var template = new DataTemplate(typeof(EventCell));
        var headerTemplate = new DataTemplate(typeof(GroupHeaderCell));

        var listview = new ListView {
            ItemsSource = Methods.groupedEvents,
            IsGroupingEnabled = true,
            GroupHeaderTemplate = headerTemplate,
            HasUnevenRows = true,
            RowHeight = 85,
            BackgroundColor = Color.White,
            ItemTemplate = template,
            SeparatorVisibility = SeparatorVisibility.Default,
            SeparatorColor = Color.FromHex("#F5F5F5"),
            VerticalOptions = LayoutOptions.FillAndExpand
        };

        listview.ItemTapped += this.Tapped;

        var absolutLayout = new AbsoluteLayout{BackgroundColor = Color.Aqua};
        AbsoluteLayout.SetLayoutBounds (listview, new Rectangle (0, 0, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
        AbsoluteLayout.SetLayoutFlags (listview, AbsoluteLayoutFlags.PositionProportional);

        absolutLayout.Children.Add (listview);

        Content = absolutLayout;

        InitializeComponent ();

    }
Tagged:

Best Answer

Answers

  • ArccexArccex DEMember

    Ok this solved the problem :)

Sign In or Register to comment.