diff --git a/doc/source/handycontrol/extend_controls/messageBox/index.md b/doc/source/handycontrol/extend_controls/messageBox/index.md index ca12ad62..6028331a 100644 --- a/doc/source/handycontrol/extend_controls/messageBox/index.md +++ b/doc/source/handycontrol/extend_controls/messageBox/index.md @@ -1,5 +1,40 @@ --- -title: 建设中 +title: MessageBox 消息对话框 --- -建设中 \ No newline at end of file +HC重写了一套消息对话框,使用方式和原生一致. + +```cs +public sealed class MessageBox : Window +``` + +# 属性 + +|属性|描述|默认值|备注| +|-|-|-|-| +|Message|消息内容||| +|Image|消息类型示意图||| +|ImageBrush|消息类型示意图颜色||| +|ShowImage|是否显示消息类型示意图|false||| + +# 方法 + +|名称|说明| +|-|-| +| Success(string, string) | 显示一则成功消息 | +| Info(string, string) | 显示一则通知消息 | +| Warning(string, string) | 显示一则警告消息 | +| Error(string, string) | 显示一则错误消息 | +| Fatal(string, string) | 显示一则严重消息 | +| Ask(string, string) | 显示一则询问消息 | +| Show(MessageBoxInfo) | 显示一则自定义消息 | +| Show(string, string, MessageBoxButton, MessageBoxImage, MessageBoxResult) | 显示一则消息 | +| Show(Window, string, string, MessageBoxButton, MessageBoxImage, MessageBoxResult) | 显示一则消息 | + +# 案例 + +```cs +MessageBox.Show(Properties.Langs.Lang.GrowlAsk, Properties.Langs.Lang.Title, MessageBoxButton.YesNo, MessageBoxImage.Question); +``` + +![MessageBox](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/MessageBox.png) \ No newline at end of file diff --git a/doc/themes/next/source/css/_custom/custom.styl b/doc/themes/next/source/css/_custom/custom.styl index b8b20499..5e47db8f 100644 --- a/doc/themes/next/source/css/_custom/custom.styl +++ b/doc/themes/next/source/css/_custom/custom.styl @@ -1,5 +1,9 @@ // Custom styles. +.container{ + min-height: 100%; +} + .container:before{ content: ""; opacity: 0.1; @@ -8,9 +12,10 @@ bottom: 0; right: 0; position: absolute; - z-index: -1; + z-index: -1; background: url(https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/cloud.png); } + .posts-expand .post-body img { margin: 3px; display: inline; diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml.cs index b10b0577..dccc1d0f 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml.cs @@ -4,7 +4,6 @@ using HandyControl.Data; using HandyControl.Tools; using MessageBox = HandyControl.Controls.MessageBox; - namespace HandyControlDemo.UserControl { public partial class WindowDemoCtl