WPF how to change which window opens firstThere is already an open DataReader associated with this Command which must be closed firstSet custom window position on wpfWPF App Doesn't Shut Down When Closing Main WindowSecond Window Positioning WPFA WPF window doesn't release the memory after closedOpen link in new tab or windowHow to make main window wait until a newly opened window closes in C# WPF?WPF - C# - open parent window only onceWPF Window Not VisibleWPF + Windows Forms, open a second Form as child of MainWindow from the first Form

NIntegrate doesn't evaluate

what kind of chord progession is this?

What is a really good book for complex variables?

In general, would I need to season a meat when making a sauce?

Who will lead the country until there is a new Tory leader?

What is Theresa May waiting for?

I unknowingly submitted plagarised work

Where is the logic in castrating fighters?

Count Even Digits In Number

Installed Tankless Water Heater - Internet loss when active

Why did David Cameron offer a referendum on the European Union?

Externally monitoring CPU/SSD activity without software access

Is the Indo-European language family made up?

Should breaking down something like a door be adjudicated as an attempt to beat its AC and HP, or as an ability check against a set DC?

Is it rude to call a professor by their last name with no prefix in a non-academic setting?

How to respond to an upset student?

I know that there is a preselected candidate for a position to be filled at my department. What should I do?

Any advice on creating fictional locations in real places when writing historical fiction?

Make 24 using exactly three 3s

Why are C64 games inconsistent with which joystick port they use?

Why aren't space telescopes put in GEO?

Why does Mjolnir fall down in Age of Ultron but not in Endgame?

Compaq Portable vs IBM 5155 Portable PC

My players want to grind XP but we're using milestone advancement



WPF how to change which window opens first


There is already an open DataReader associated with this Command which must be closed firstSet custom window position on wpfWPF App Doesn't Shut Down When Closing Main WindowSecond Window Positioning WPFA WPF window doesn't release the memory after closedOpen link in new tab or windowHow to make main window wait until a newly opened window closes in C# WPF?WPF - C# - open parent window only onceWPF Window Not VisibleWPF + Windows Forms, open a second Form as child of MainWindow from the first Form






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















Im using WPF to make a simple budget app for myself as practice and I can't figure out how to change which window opens first. I mean when you start the program , right now it opens the MainWindow, but I want it to open another window. I have tried this in my app.xaml.cs file:



 public partial class App : Application

void App_Startup(object sender , StartupEventArgs e)

GetNameWindow getNameWindow = new GetNameWindow();
getNameWindow.Show();




which I read was a way to do it but it doesn't work for me. I'm using c# and visual studio 2017. Thanks!










share|improve this question

















  • 1





    Have a look at app.xaml file

    – Sir Rufo
    Mar 24 at 3:54

















1















Im using WPF to make a simple budget app for myself as practice and I can't figure out how to change which window opens first. I mean when you start the program , right now it opens the MainWindow, but I want it to open another window. I have tried this in my app.xaml.cs file:



 public partial class App : Application

void App_Startup(object sender , StartupEventArgs e)

GetNameWindow getNameWindow = new GetNameWindow();
getNameWindow.Show();




which I read was a way to do it but it doesn't work for me. I'm using c# and visual studio 2017. Thanks!










share|improve this question

















  • 1





    Have a look at app.xaml file

    – Sir Rufo
    Mar 24 at 3:54













1












1








1








Im using WPF to make a simple budget app for myself as practice and I can't figure out how to change which window opens first. I mean when you start the program , right now it opens the MainWindow, but I want it to open another window. I have tried this in my app.xaml.cs file:



 public partial class App : Application

void App_Startup(object sender , StartupEventArgs e)

GetNameWindow getNameWindow = new GetNameWindow();
getNameWindow.Show();




which I read was a way to do it but it doesn't work for me. I'm using c# and visual studio 2017. Thanks!










share|improve this question














Im using WPF to make a simple budget app for myself as practice and I can't figure out how to change which window opens first. I mean when you start the program , right now it opens the MainWindow, but I want it to open another window. I have tried this in my app.xaml.cs file:



 public partial class App : Application

void App_Startup(object sender , StartupEventArgs e)

GetNameWindow getNameWindow = new GetNameWindow();
getNameWindow.Show();




which I read was a way to do it but it doesn't work for me. I'm using c# and visual studio 2017. Thanks!







c# wpf window






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 24 at 3:49









Yummy275Yummy275

737




737







  • 1





    Have a look at app.xaml file

    – Sir Rufo
    Mar 24 at 3:54












  • 1





    Have a look at app.xaml file

    – Sir Rufo
    Mar 24 at 3:54







1




1





Have a look at app.xaml file

– Sir Rufo
Mar 24 at 3:54





Have a look at app.xaml file

– Sir Rufo
Mar 24 at 3:54












1 Answer
1






active

oldest

votes


















1














To change the startup window, open App.xaml and replace "MainWindow.xaml" with your window:



StartupUri="GetNameWindow.xaml">


For what you were trying to do, you would need to remove StartupUri="MainWindow.xaml" and instead use Startup="App_Startup" and then it would call your event Handler at startup.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55320565%2fwpf-how-to-change-which-window-opens-first%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    To change the startup window, open App.xaml and replace "MainWindow.xaml" with your window:



    StartupUri="GetNameWindow.xaml">


    For what you were trying to do, you would need to remove StartupUri="MainWindow.xaml" and instead use Startup="App_Startup" and then it would call your event Handler at startup.






    share|improve this answer



























      1














      To change the startup window, open App.xaml and replace "MainWindow.xaml" with your window:



      StartupUri="GetNameWindow.xaml">


      For what you were trying to do, you would need to remove StartupUri="MainWindow.xaml" and instead use Startup="App_Startup" and then it would call your event Handler at startup.






      share|improve this answer

























        1












        1








        1







        To change the startup window, open App.xaml and replace "MainWindow.xaml" with your window:



        StartupUri="GetNameWindow.xaml">


        For what you were trying to do, you would need to remove StartupUri="MainWindow.xaml" and instead use Startup="App_Startup" and then it would call your event Handler at startup.






        share|improve this answer













        To change the startup window, open App.xaml and replace "MainWindow.xaml" with your window:



        StartupUri="GetNameWindow.xaml">


        For what you were trying to do, you would need to remove StartupUri="MainWindow.xaml" and instead use Startup="App_Startup" and then it would call your event Handler at startup.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 24 at 4:33









        Tanner OTanner O

        263




        263





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55320565%2fwpf-how-to-change-which-window-opens-first%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현