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");
}