Xamarin 画面の向きを固定する

AndroidプロジェクトMainActivity.csの属性に以下のコードを追加する

  • 縦固定の場合
    ScreenOrientation = ScreenOrientation.Portrait
  • 横固定の場合
    ScreenOrientation = ScreenOrientation.Landscape

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

This site uses Akismet to reduce spam. Learn how your comment data is processed.