public static WPFMessageBoxResult Show(string title, string message, string details, WPFMessageBoxButtons buttonOption, WPFMessageBoxImage image) { ___MessageBox = new WPFMessageBox(); var __ViewModel = new MessageBoxViewModel(___MessageBox, title, message, details, buttonOption, image); ___MessageBox.DataContext = __ViewModel; ___MessageBox.WindowStartupLocation = WindowStartupLocation.CenterScreen; ___MessageBox.ShowDialog(); return ___MessageBox.Result; }
public MessageBoxViewModel(WPFMessageBox view, string title, string message, string innerMessage, WPFMessageBoxButtons buttonOption, WPFMessageBoxImage image) { Title = title; Message = message; InnerMessageDetails = innerMessage; SetButtonVisibility(buttonOption); SetImageSource(image); ___View = view; }