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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:31:49+00:00 2026-05-26T20:31:49+00:00

My app’s main UI is in MainWindow.xaml. Firstly – what is causing this to

  • 0

My app’s main UI is in MainWindow.xaml.

Firstly – what is causing this to be the window the application opens on startup. It does not appear to be defined as a “starup object” and there does not appear to be any code that specifically launches this window.

I can make my login window appear when the app starts by in the loaded event of MainWindow.xaml defining a new “login.xaml” and telling it to show as a dialog. However, if I do this then MainWindow does not appear until Login has been closed.

What I want to achieve is when my app starts, the MainWindow appears and then on top of that the Login window is displayed modally.

How can this be done?

  • 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-26T20:31:50+00:00Added an answer on May 26, 2026 at 8:31 pm
    1. The startup of the MainWindow is defined in App.xaml by default when creating a project in VS:

      <Application ...
                   StartupUri="MainWindow.xaml">
          <Application.Resources>
      
          </Application.Resources>
      </Application>
      
    2. Creating the dialogue in the Loaded event should work, just don’t do it in the constructor where it is not yet loaded.

      Loaded="Window_Loaded"
      
      private void Window_Loaded(object sender, RoutedEventArgs e)
      {
          new LoginDialogue().ShowDialog();
      }
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

App A has this BroadcastReceiver in its manifest (within <application>): And this receiver: public
My app fails at this line of code: Dim objConnection As New SqlConnection(Application(ConnString)) My
app/assets/stylesheets/application.css *= require formtastic I get this error: rake assets:precompile /Users/Nerian/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby /Users/Nerian/.rvm/gems/ruby-1.9.3-rc1@davinci/bin/rake assets:precompile:all RAILS_ENV=production
My app uses a WebRequest at certain points to get pages from itself. This
App runs on simulator on my MacBook Air, but not on iMac. I have
My app compiles to about 80mb. I was under the impression this was quite
app.yaml application: cloudymovie version: 1 runtime: java welcome_files: - test.jsp handlers: - url: /test/*
App is in prism/mvvm/mef and uses loading by attribute like StockTraderRI. My shell window
My app must NOT auto -rotate at all. But it includes a screen which
My app, which uses ARC, does the following: Uploads a picture taken by the

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.