Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }