【发布时间】:2023-02-02 14:15:10
【问题描述】:
当用户向下滚动时,我试图获得与 iOS 上的设置应用程序相同的大标题行为。大标题和小标题之间的过渡是平滑的。但在 Xamarin Forms 上,标题会卡住。
在我的 NavigationPage 中,我设置了PrefersLargeTitles="true"。在嵌入的内容页面中,我设置了LargeTitleDisplay="Always" 和UseSafeArea="true"。页面中的内容如下所示:
<ContentPage.Content>
<AbsoluteLayout>
<ListView />
<Frame x:Name="LoadingFrame" /> <!-- Only visible until ListView is loaded -->
</AbsoluteLayout>
</ContentPage.Content>
我尝试设置NavigationPage.IsNavigationBarTranslucent="True"。然后它可以工作,但前提是我在 ContentPage 中禁用 SafeArea (Page.UseSafeArea="False")。禁用 SafeArea 不是我想要的,因为现在内容落后于缺口。
【问题讨论】:
标签: xaml xamarin xamarin.forms xamarin.ios