public static void ShowMessageBox(string content, Action okAction = null, string caption = "Informacja", string buttonOkCaption = "OK")
        {
            var         viewModel       = new MessageBoxViewModel(caption, content, okAction, buttonOkCaption);
            var         messageBox      = new MessageBox(viewModel);
            Icon        icon            = SystemIcons.Information;
            ImageSource iconImageSource = Imaging.CreateBitmapSourceFromHIcon(
                icon.Handle,
                Int32Rect.Empty,
                BitmapSizeOptions.FromEmptyOptions());

            messageBox.Icon = iconImageSource;
            messageBox.ShowDialog();
        }
Ejemplo n.º 2
0
 public MessageBox(MessageBoxViewModel viewModel)
 {
     InitializeComponent();
     DataContext = viewModel;
 }