Ich habe gerade WPF
jetzt gestartet. Ich weise startupURI
Seite vom Code zurück zu. Es gibt mir diese Fehlermeldung:Die Ressource 'application_startup' konnte nicht gefunden werden
Cannot locate resource 'application_startup'"
hier ist das, was ich in App.xaml
<Application x:Class="HelloWpf.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Application_Startup">
<Application.Resources>
</Application.Resources>
hier getan ist, was ich in App.xaml.cs Datei getan haben:
private void Application_Startup(object sender, StartupEventArgs e)
{
// Create the startup window
MainWindow wnd = new MainWindow();
// Do stuff here, e.g. to the window
wnd.Title = "Something else";
// Show the window
wnd.Show();
//Application.Current.MainWindow = wnd;
//wnd.InitializeComponent();
//wnd.Show();
}
Bitte helfen Sie, was in diesem einfachen code falsch ist. Danke
Ereignisname ist 'Startup', nicht' StartupUri' (das ist Eigenschaft). Subscribe den Handler richtig: 'Startup =" Application_Startup "' – ASh
das funktioniert. Danke .. –