首页 > Windows开发 > 详细

Windows8 UI MessageBox In DevExpress

时间:2016-12-04 13:43:44      阅读:723      评论:0      收藏:0      [点我收藏+]
// 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

原文:http://www.cnblogs.com/bodong/p/6130425.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!