internal void Compose() { var owner = Application.Current.MainWindow; var window = new CompositionWindow(); window.MimicOwnership(Application.Current.MainWindow); window.Source = typeof(ComposeMessagePage).ToPageUri("?action=new"); if (owner.WindowState == WindowState.Maximized) { window.WindowState = WindowState.Maximized; } window.Show(); }
internal void Compose(Uri uri) { var message = App.Context.SelectedMessage; if (message == null) { throw new InvalidOperationException(); } var owner = Application.Current.MainWindow; var window = new CompositionWindow { Source = uri }; window.MimicOwnership(owner); if (owner.WindowState == WindowState.Maximized) { window.WindowState = WindowState.Maximized; } window.Show(); }