Exemplo n.º 1
0
        private void newMetroWindowOnStaThread_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            TestMetroWindow newWindow = WindowHelper.CreateWindowOnNewStaThread <TestMetroWindow, object>(
                args => {
                TestMetroWindow window = new TestMetroWindow();
                window.Show();
                return(window);
            },
                null,
                out Exception error);

            if (newWindow == null)
            {
                Trace.TraceError("WindowHelper returned a null MetroWindow.");
            }
            if (error != null)
            {
                Trace.TraceError("WindowHelper returned an error for a MetroWindow: {0}", error);
            }
        }
Exemplo n.º 2
0
        private void newMetroWindowOnMainThread_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            TestMetroWindow window = new TestMetroWindow();

            window.Show();
        }