customise the messagebox

This commit is contained in:
NaBian committed 2019-01-24 23:42:12 +08:00
1 parent 8a8241f0e6
commit 43d1e7e4f4
15 files changed
+268 -115

No files matched your search

@@ -12,6 +12,7 @@
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.BlurWindow}" Content="{x:Static langs:Lang.OpenBlurWindow}"/>
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.CustomNonClientAreaWindow}" Content="{x:Static langs:Lang.OpenCustomNonClientAreaWindow}"/>
<Button Click="ButtonMessage_OnClick" Content="{x:Static langs:Lang.OpenMessageWindow}"/>
<Button Click="ButtonCustomMessage_OnClick" Content="{x:Static langs:Lang.OpenCustomMessageWindow}"/>
<Button Click="ButtonCustomContent_OnClick" Content="{x:Static langs:Lang.OpenCustomContentWindow}"/>
<Button Name="ButtonMouseFollow" Click="ButtonMouseFollow_OnClick" Content="{x:Static langs:Lang.OpenMouseFollowWindow}"/>
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.NoNonClientAreaDragableWindow}" Content="{x:Static langs:Lang.OpenNoNonClientAreaDragableWindow}"/>
@@ -1,5 +1,6 @@
using System.Windows;
using HandyControl.Controls;
using HandyControl.Data;
using HandyControl.Tools;
using MessageBox = HandyControl.Controls.MessageBox;
@@ -18,6 +19,19 @@ namespace HandyControlDemo.UserControl
MessageBox.Show(Properties.Langs.Lang.GrowlAsk, Properties.Langs.Lang.Title, MessageBoxButton.YesNo, MessageBoxImage.Question);
}
private void ButtonCustomMessage_OnClick(object sender, RoutedEventArgs e)
{
MessageBox.Show(new MessageBoxInfo
{
MessageBoxText = Properties.Langs.Lang.GrowlAsk,
Caption = Properties.Langs.Lang.Title,
Button = MessageBoxButton.YesNo,
IconBrushKey = ResourceToken.AccentBrush,
IconKey = ResourceToken.AskGeometry,
Style = ResourceHelper.GetResource<Style>("MessageBoxCustom")
});
}
private void ButtonMouseFollow_OnClick(object sender, RoutedEventArgs e)
{
var picker = SingleOpenHelper.CreateControl<ColorPicker>();