protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); mainWindow = new MainWindow(); formMessage = new FormMessage(mainWindow); //create the notifyicon (it's a resource declared in NotifyIconResources.xaml notifyIcon = (TaskbarIcon)FindResource("NotifyIcon"); mainWindow.ShowInTaskbar = false; mainWindow.Show(); Current.MainWindow = mainWindow; }
public MainWindow() { InitializeComponent(); formMessage = new FormMessage(this); }