Beispiel #1
0
        private void Todesknopf_OnClick(object sender, RoutedEventArgs e)
        {
            //show a sample dialog
            var mainWindow = Application.Current.MainWindow;
            var result     = BlurryMessageBox.Show(mainWindow,
                                                   "By pressing OK a ColorAnimation will alter the control's background and a sample TrayControl will show up for the default duration of 10 seconds or until you click somewhere else.",
                                                   "This is a MessageBox!", BlurryDialogButton.Ok, BlurryDialogIcon.Information);

            // show a sample tray control when ok is clicked
            if (result == BlurryDialogResult.Ok)
            {
                var tray = new InvokedTrayWindow();
                tray.Show();
            }
        }
        private void SampleInvokeButton_OnClick(object sender, RoutedEventArgs e)
        {
            //show a sample dialog
            var mainWindow = Application.Current.MainWindow;
            var result     = BlurryMessageBox.Show(mainWindow,
                                                   "By pressing OK a sample TrayControl will show up for the duration of 5 seconds, or until you click somewhere else.",
                                                   "This is a MessageBox!", BlurryDialogButton.Ok, BlurryDialogIcon.Information);

            // show a sample tray control when ok is clicked
            if (result == BlurryDialogResult.Ok)
            {
                var tray = new InvokedTrayWindow();
                tray.Show();
            }
        }
        private void SampleInvokeButton_OnClick(object sender, RoutedEventArgs e)
        {
            //show a custom dialog
            var mainWindow             = Application.Current.MainWindow;
            var dogeControl            = new BlurryDogeControl();
            var customButtonCollection = new ButtonCollection()
            {
                new Button()
                {
                    Content = "Custom Ok", Margin = new Thickness(2.5, 0, 2.5, 0)
                },
                new Button()
                {
                    Content = "Custom Cancel", Margin = new Thickness(2.5, 0, 2.5, 0)
                }
            };

            var result = BlurryMessageBox.Show(mainWindow, "Custom Dialog", dogeControl, customButtonCollection, 0d);
        }
Beispiel #4
0
 private void App_OnDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
 {
     BlurryMessageBox.Show(e.Exception.Message);
 }
Beispiel #5
0
 private void HelloMenuBarButton_OnClick(object sender, RoutedEventArgs e)
 {
     BlurryMessageBox.Show(this, Lorem.Ipsum, "Hello");
 }
Beispiel #6
0
 private void HelloMenuBarButton_OnClick(object sender, RoutedEventArgs e)
 {
     BlurryMessageBox.Show(this, "You did the thing.", "Hello");
 }