我有一个页面,我想有一个标题总是在顶部和按钮总是在底部视图。中间的内容是可滚动的。
我认为这很容易做到以下几点:
StackLayout outer = new StackLayout();
StackLayout inner = new StackLayout();//with all of the content added
ScrollView scroll = new ScrollView();
outer.Children.Add(headerLabel);//non-scrolling
scroll.Content = inner;
outer.Children.Add(scroll); //scrolling
outer.Children.Add(button); //non-scrollingheaderLabel和按钮停留在corrrect位置上,但是内容会一直滚动到页面的顶部,在headerLabel的顶部(但是在底部的按钮下面/下面)。
我肯定它是正确的工作,但我不记得改变了什么。
有人知道为什么会发生这种事吗?
发布于 2014-10-06 04:50:13
所以这个修好了
outer.VerticalOptions = LayoutOptions.End;和
scroll.IsClippedToBounds=true;https://stackoverflow.com/questions/26202351
复制相似问题