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

  • Home
  • SEARCH
  • 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 6893823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:42:24+00:00 2026-05-27T06:42:24+00:00

How do I open an new window from AccessoryButtonTapped button from my BasisViewController. Right

  • 0

How do I open an new window from AccessoryButtonTapped button from my BasisViewController. Right now I have this for open, but the problem is the NavigationController which I can’t find because I’m inherent the UITableViewSource.

Opskrift ops = new Opskrift(item.ImageName, item.Name, item.optionTxt, item.SubHeading)
this.NavigationController.PushViewController(this.opskrift, true);

If I use ops.NavigationController.PushViewController(this.opskrift, true);

I get an Object reference not set to an instance of an object exception.

  • 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-05-27T06:42:25+00:00Added an answer on May 27, 2026 at 6:42 am

    Give your UITableViewSource inherited class access to your controller by passing it through its constructor:

    public class MyTableSource : UITableViewSource
    {
    
        private BasisViewController controller;
        public MyTableSource(BasisViewController parentController)
        {
            this.controller = parentController;
        }
    
        //use like this in a method:
        //this.controller.NavigationController.PushViewController(opskrift, true);
    }
    

    Your Opfskrift controller’s NavigationController property returns null because it is not part of a navigation controller’s stack when you initialize it (=hasn’t been “pushed” in a navigation controller). Of course, BasisViewController must also belong to a navigation controller for its NavigationController property to contain something other than null.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have window form in my WPF Application when I open new window from
I am opening a new window from a button using var myWindow = window.open(...).
I used JavaScript to open a new window(child) when user clicks on button from
I have a main window (#1) on my webpage from which I open a
I'm opening a new window from javascript using this code window.open('index.htm', 'myWindow', 'width=1020,height=400'); However
How can i open new window (TextView) from ListView by setOnItemClickListener? I have tried
I am trying to open a new window from javascript but nothing is being
I have this codes in my projects to open a new window to show
I have two pages, the parent and from this page I am using: window.open('OrderDetailsFull.aspx?ObjectID='
I need to open a new window from code-behind on post-back if a specific

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.