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 7058275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:05:36+00:00 2026-05-28T04:05:36+00:00

So i am in some window2 from this window I tried get frame defined

  • 0

So i am in some window2 from this window I tried get frame defined in MainWindow.xaml
by creating a object of Mainwindow and tried to Navigate to a page but program giving ” null reference exception unhandeled by user code”

I used:

 public Window2()
  {
   }

 myfunction()
 {
 MainWindow rootwindow = new MainWindow();
  rootwindow.myframe.Navigate( new Page1());
  }
  • 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-28T04:05:37+00:00Added an answer on May 28, 2026 at 4:05 am

    This is not how you get the frame from another window, you are just creating a new window and try to access something which is not loaded yet as the window you just created has not even been shown yet.

    You need a reference to your window, which you could get from Application.Current.MainWindow if you set that accordingly beforehand (e.g. in the App class). Or you could pass a reference to the main window in the constructor of your second window.

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

Sidebar

Related Questions

I'm opening a new browser window from my site for some of the members.
How can I pass back some arguments from a window that is closed? For
I would like to send some keystrokes from a C++ program into another window.
How to read the highlighted/Selected Text from any window using c#. i tried 2
I need to get the color of some pixels on the screen or from
I am doing some research on a asp.net bug. I tried to get adplus
I've create a WinForms control that inherits from System.Windows.Forms.UserControl...I've got some custom events on
Under Windows there are some handy functions like QueryPerformanceCounter from mmsystem.h to create a
I need to extract some bitmaps from an .msstyles file (the Windows XP visual
I wrote a windows service using VB that read some legacy data from Visual

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.