コード例 #1
0
        public virtual MessageBoxResult ShowMessage(
            string title,
            string message,
            MessageBoxButton button = MessageBoxButton.OK,
            MessageBoxImage icon    = MessageBoxImage.Information)
        {
            Func <MessageBoxResult> action = () =>
                                             messageBox.ShowBox(Application.Current.GetMainWindow(), title, message, button, icon);

            return(Application.Current.Sync().Execute(action));
        }