Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Startup of Application Exception Can't find resource named
Cynthia
May 19 2017 5:45 AM
293
Reply
Hi I am new to WPF ,
In my WPF MVVM application , before starting of application there are some conditions to check after which homewindow screen will come other wise login screen will come .
The code which i have written is like this -:
public App()
{
if (System.Configuration.ConfigurationManager.AppSettings.Count > 0)
{
app.MainWindow homeWindow = new app.MainWindow();
var app = new Application();
app.Run(homeWindow);
}
else
{
LoginWindow mainWindow = new LoginWindow();
var app = new Application();
app.Run(mainWindow);
}
If i run it normally like Startup URI="LoginWindow.xaml" without anycondition , loginscreen window is coming but when i am using as i have stated in the code its throwing exception, Can't find named resource . Resources are case sensitive at one of my static resource.
Why that exception is coming?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Get the value of specific cell in the datagrid MVVM Model
Error in having 2 App.xaml in same solution