TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Set as default window in WPF application
Purushottam Rathore
Sep 15, 2010
29.5
k
0
2
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
How to set as default window in WPF application?
By default you will get
App.xaml
as follows:
<
Application
x
:
Class
="Login_WPF.App"
xmlns
="
http://schemas.microsoft.com/winfx/2006/xaml/presentation
"
xmlns
:
x
="
http://schemas.microsoft.com/winfx/2006/xaml
"
StartupUri
="
MainWindow.xaml
">
<
Application.Resources
>
</
Application.Resources
>
</
Application
>
In the above App.xaml default window is "Main Window". if you want to open "
Registration
" window first then change the StartUpUrl property of the application in App.xaml like as follows:
<
Application
x
:
Class
="Login_WPF.App"
xmlns
="
http://schemas.microsoft.com/winfx/2006/xaml/presentation
"
xmlns
:
x
="
http://schemas.microsoft.com/winfx/2006/xaml
"
StartupUri
="
Registration.xaml
">
<
Application.Resources
>
</
Application.Resources
>
</
Application
>
Set as default window in WPF application
Next Recommended Reading
WPF-Set Background color.