private void CreateNewNote() { var nw = new NoteWindow(System.IO.Path.Combine(applicationFolder, Guid.NewGuid().ToString())); nw.Owner = this; nw.ShowActivated = true; nw.Show(); }
private void LoadNotes() { if (!firstInstance) { Close(); return; } foreach (var noteSettingsFile in Directory.EnumerateFiles(applicationFolder, "*.xml", SearchOption.TopDirectoryOnly)) { var note = new NoteWindow(noteSettingsFile); note.Owner = this; note.ShowActivated = false; note.Show(); } // Just hiding the window is not sufficient, as it still temporarily pops up the first time. Therefore, make it transparent. // AllowsTransparency = true; // Background = Brushes.Transparent; // WindowStyle = WindowStyle.None; Visibility = Visibility.Hidden; ShowInTaskbar = false; }