Example #1
0
        private void newWpfWindowOnStaThread_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            WpfWindow newWindow = WindowHelper.CreateWindowOnNewStaThread <WpfWindow, object>(
                args => {
                WpfWindow window = new WpfWindow();
                window.Show();
                return(window);
            },
                null,
                out Exception error);

            if (newWindow == null)
            {
                Trace.TraceError("WindowHelper returned a null Wpf Window.");
            }
            if (error != null)
            {
                Trace.TraceError("WindowHelper returned an error for a Wpf Window: {0}", error);
            }
        }
Example #2
0
        private void newWpfWindowOnMainThread_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            WpfWindow window = new WpfWindow();

            window.Show();
        }