Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

What to use instead of StackLayout in a ScrollView?

$
0
0

I have a page with the following structure (simplified):

<ContentPage>
    <ScrollView>
        <StackLayout Orientation="Vertical">
            <Frame>
                <custom:Expander>
                    [actual content here]
                </custom:Expander>
            </Frame>

            <Frame>
                <custom:Expander>
                    [actual content here]
                </custom:Expander>
            </Frame>

            <Frame>
                <custom:Expander>
                    [actual content here]
                </custom:Expander>
            </Frame>

            <Frame>
                <custom:Expander>
                    [actual content here]
                </custom:Expander>
            </Frame>
        </StackLayout>
    </ScrollView>
</ContentPage>

The content of the Frames is not the same.
Imagine yourself the page as some kind of details view for an item.
Every Frame represents a different "section" of associated item information.

I would like to reduce the nesting and replace the ScrollView > StackLayout structure with something more performant.
What are the best practices for scenarios like mine?


Viewing all articles
Browse latest Browse all 89864

Trending Articles