Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7943619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:19:19+00:00 2026-06-04T00:19:19+00:00

I just upgraded to Mono for Android version 4.2. Since then I am getting

  • 0

I just upgraded to Mono for Android version 4.2. Since then I am getting an error when trying to call SetRequestedOrientation from an Activity. Just get an error that says it does not exist in the current context. I was using v4.0 and this was working fine.

Just wondering if anyone else is having this issue since upgrading or if you know of a fix. Thanks.

This code used to work fine.

using System;

using Android.App;
using Android.Content.PM;
using Android.OS;

namespace AndroidApplication1
{
    [Activity(Label = "AndroidApplication1")]
    public class Activity1 : Activity
    {
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetRequestedOrientation(ScreenOrientation.Portrait);
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:19:21+00:00Added an answer on June 4, 2026 at 12:19 am

    That’s exposed through the RequestedOrientation property.

    RequestedOrientation = ScreenOrientation.Portrait;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just upgraded jQuery to version 1.4.2 and I am now getting an error
I just upgraded my PHP version from v5.3.1 to v5.3.9 . Suddenly class constructors
I just upgraded to Snow Leopard and I'm trying to get it to use
I just upgraded to Rails 3.2.0 and get this error after signing up to
I just upgraded to iPhone SDK 3.2 Beta 4. Since doing so, I have
I just upgraded my jQuery from 1.3.2 to 1.4.2, and I think it's giving
Just upgraded a MBP 2009 from Snow Leopard to Lion. MySQL seems to be
Just upgraded to iPhone sdk4 and getting a lot of errors in my iPhone
I just upgraded to rails 3.2 Everything is working fine except error pages no
I just upgraded to Vista 64bit. I was running the 32bit version without any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.