Xamarin.Forms備忘録1
Xamarin.Formsでやったけど忘れそうなこと その1
・ NavigationPageで上に出るバーを消す
・ バックライト常時点灯設定
・ 画面を横画面に固定
バックライトを常時点灯させる
・Android
MainActivity.cs
this.Window.SetFlags(WindowManagerFlags.KeepScreenOn,WindowManagerFlags.KeepScreenOn);
・iOS ※未確認
AppDelegate.cs
UIApplication.SharedApplication.IdleTimerDisabled = true;
・WindowsPhone
捜索中
画面を横画面に固定する
・Android
MainActivity.cs
this.RequestedOrientation = ScreenOrientation.SensorLandscape;
・iOS ※未確認
AppDelegate.cs
[Export("application:supportedInterfaceOrientationsForWindow:")] public UIInterfaceOrientationMask GetSupportedInterfaceOrientations(UIApplication application, IntPtr forWindow) { return UIInterfaceOrientationMask.Landscape; }
※7/27 追記
・Propertiesでこう
・WindowsPhone
Package.appxmanifestでこう