I have the following code:
namespace WpfApplication2
{
///
/// Interaction logic for MainWindow.xaml
///
public p
You have two primary options to implement on start activities:
File App.xaml
Define Startup="Application_Startup"
and handle in file App.xaml.cs:
private void Application_Startup(object sender, StartupEventArgs e)
{
// On start stuff here
}
File App.xaml.cs
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
// On start stuff here
base.OnStartup(e);
// Or here, where you find it more appropriate
}
}