xamarin.Forms仅滚动页面的一部分
问题描述:
我有一个页面,我希望在顶部始终显示标题,并始终在底部显示按钮。中间的内容是可滚动的。xamarin.Forms仅滚动页面的一部分
我认为这将是通过执行以下操作简单:
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-scrolling
的headerLabel和按钮停留在corrrect位置,但内容向右滚动到页面的顶部,在顶部headerLabel(但位于底部按钮下方/下方)。
我很积极,它工作正常,但我不记得任何改变。
有没有人对此有何想法?
inner.Children.Add(内);盗梦空间? :) – 2014-10-05 14:45:07
编译时使用Android API版本23恢复编译和目标到22,并修复它时有此问题。因此可能与您定位的API版本有关或者目标和值不相同。 @MihaMarkic修复作为一个临时工,直到我发现问题。 – SatanEnglish 2015-12-07 01:11:43