如何使用 Xamarin 表单防止屏幕顶部移动

问题描述

我想将顶部固定时间并使用灰色背景色。我无法弄清楚屏幕的那部分被称为什么,任何有关此的信息都会非常有用。我目前正在首先研究 IOS 部分,但 android 提示也会有所帮助。

enter image description here

解决方法

这对我有用。

this.Padding = new Thickness(0,Device.OnPlatform(30,0),0);

enter image description here