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;
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
add a comment |
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
1
Have a look at app.xaml file
– Sir Rufo
Mar 24 at 3:54
add a comment |
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
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
c# wpf window
asked Mar 24 at 3:49
Yummy275Yummy275
737
737
1
Have a look at app.xaml file
– Sir Rufo
Mar 24 at 3:54
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Mar 24 at 4:33
Tanner OTanner O
263
263
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
Have a look at app.xaml file
– Sir Rufo
Mar 24 at 3:54