How to place an Absolute Layout inside a Stack Layout

Hello there! So what I'm trying to accomplish is the following: I have a scrollview with a stack layout inside it, and I'd like to create multiple absolute layouts which each wrap around a group of elements, which would then be added into the stack layout. For the sake of clarification consider something like Instagram's homepage, where you have Posts composed of an Image, the User's Name on top of It, and the comments section beneath it. Ideally, I'd like to create those "post" objects and have them wrapped inside an absolute layout, which in turn would be stacked inside a stacklayout, which would be scrollable (inside a scroll view). Now, I'm not sure if the way I'm implementing it is the best way to do so, but any help would be appreciated.

Code looks something like this


    <StackLayout x:Name="StackLayout_Container"
                 HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"


I then create CardObjects as needed with each containing its own absolute layout, and later have them added to the StackLayout. This works, but for some reason the views inside the absolutelayout (images, labels ..etc) end up being too small and aren't positioned correctly, and the scrollview isn't scrollable. Any help is appreciated

Sign In or Register to comment.