Windows8 UI MessageBox In DevExpress

Posted 花式撸管手

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Windows8 UI MessageBox In DevExpress相关的知识,希望对你有一定的参考价值。

// custom messagebox 
using System;
using System.Drawing;
using System.Windows.Forms;
using DevExpress.XtraBars.Docking2010.Views.WindowsUI;
using DevExpress.XtraBars.Docking2010.Customization;

namespace StatTools
{
    public static class MessageBoxService
    {
        public static DialogResult ShowMessageBox(Form InOwner, string InCaption, string InMessage, bool bShowCancel = false)
        {
            FlyoutAction action = new FlyoutAction() { Caption = InCaption, Description = InMessage };
            FlyoutCommand command1 = new FlyoutCommand() { Text = "确定", Result = System.Windows.Forms.DialogResult.Yes };
            
            action.Commands.Add(command1);

            if( bShowCancel )
            {
                FlyoutCommand command2 = new FlyoutCommand() { Text = "取消", Result = System.Windows.Forms.DialogResult.No };
                action.Commands.Add(command2);
            }
            
            FlyoutProperties properties = new FlyoutProperties();
            properties.ButtonSize = new Size(100, 40);
            properties.Style = FlyoutStyle.MessageBox;

            return FlyoutDialog.Show(InOwner, action);
        }
    }
}

以上是关于Windows8 UI MessageBox In DevExpress的主要内容,如果未能解决你的问题,请参考以下文章

MessageBox

Vue.js 和 Jest - Element-UI 如何以编程方式确认 MessageBox?

mint-ui里面的MessageBox怎么去判断确认还是取消

Element-Ui组件 MessageBox 弹框

MessageBox 函数

mint-ui之toast使用(messagebox,indicator同理)