Example #1
0
        // Opens Custom Windows style Dialog Window and setting the owner of that window to the passed in paramater. Optinal use since a dialog can be directly opened.
        public static WindowMessageResult OpenWindowsDialog(DialogData data, Window window)
        {
            WindowMessageResult result = WindowMessageResult.Undefined;

            if (Application.Current == null)
            {
                return(result);
            }

            // This will allow for use of this method from threads outside the UI thread.
            window.Dispatcher.Invoke((Action) delegate
            {
                result = MessageBoxEnhanced.OpenWindowMessage(data, window);
            });

            return(result);
        }