I have two windows and dependant upon a condition I want one to be displayed, otherwise I want the other window to be displayed.
this is what I have tried so far.
private void Application_Startup(object sender, StartupEventArgs e)
{
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
if (!string.IsNullOrEmpty(Settings.Default.CurrentEmailAddress) && !string.IsNullOrEmpty(Settings.Default.CurrentPassword))
{
StartupUri = new Uri(@"C:\Users\User1\Desktop\FoodExpiryWC\FoodExpiry\FoodExpiry\Views\UserSection\WelcomeScreen.xaml", UriKind.Relative);
}
else
{
StartupUri = new Uri(@"C:\Users\User1\Desktop\FoodExpiryWC\FoodExpiry\FoodExpiry\Views\RegisterViews\MainWindow.xaml");
}
}
However, I keep getting two different errors.
When I use the line
StartupUri = new Uri(@"C:\Users\User1\Desktop\FoodExpiryWC\FoodExpiry\FoodExpiry\Views\UserSection\WelcomeScreen.xaml", UriKind.Relative);
I get the following error
When i use the line
StartupUri = new Uri(@"C:\Users\User1\Desktop\FoodExpiryWC\FoodExpiry\FoodExpiry\Views\RegisterViews\MainWindow.xaml");
I get the following error
Is their anyway I can fix this?