if (DeviceHelper.IsMobile)
{
StatusBar status = StatusBar.GetForCurrentView();
status.BackgroundColor = Color.FromArgb((byte)0xFF, (byte)0x36, (byte)0xDE, (byte)0xA1);
status.BackgroundOpacity = 1; // 透明度
status.ForegroundColor = Colors.Black;
//status.ProgressIndicator.ShowAsync();
}
//设置手机状态栏的颜色
//StatusBar status = StatusBar.GetForCurrentView();
//status.BackgroundColor = Color.FromArgb((byte)0xFF, (byte)0x36, (byte)0xDE, (byte)0xA1);
//status.BackgroundOpacity = 1; // 透明度
//status.ForegroundColor = Colors.Black;
public class DeviceHelper
{
//判断是否为手机
public static bool IsMobile => Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons");
}