我有一個頁面,我希望在頂部始終顯示標題,並始終在底部顯示按鈕。中間的內容是可滾動的。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