Efeyabel
Efeyabel

Reputation: 508

ScrollView Overlap

I try to put a ScrollView with a StackLayout between two StackLayouts but when I scroll the elements inside the ScrollView, the items always overlap the superior StackLayout as seen in the image:

ScreenShot

The code I use is:

stackPrinc = new StackLayout()
{
    Spacing = 0,
    HorizontalOptions = LayoutOptions.FillAndExpand,
    Children = {
        ly_sup,
        new ScrollView() { Content = ly_main, IsClippedToBounds = true, BackgroundColor = Color.Olive },
        ly_inf },
};

Upvotes: 0

Views: 1346

Answers (1)

Efeyabel
Efeyabel

Reputation: 508

I solved it, its a bug happends when the scrollview got a elemen over and under him. My new code is;

stackPrinc = new StackLayout()
        {
            Spacing = 0,
            Children = {
                ly_sup,
                new StackLayout() { Children =  { new ScrollView() { Content = ly_main, IsClippedToBounds = true, BackgroundColor = Color.Aqua, } } },
                ly_inf,
            },
        };

Upvotes: 3

Related Questions