Esempio n. 1
0
 public void Show()
 {
     _dialog = new InlineModalDialog
     {
         Owner   = Application.Current.MainWindow,
         Content = this
     };
     _dialog.Show();
 }
 private void BrowseClick(object sender, RoutedEventArgs e)
 {
     _dialog = new InlineModalDialog
     {
         Owner   = this,
         Content = new CategoriesView {
             DataContext = ViewModel
         },
         Margin = new Thickness(40),
         HorizontalAlignment = HorizontalAlignment.Stretch,
         VerticalAlignment   = VerticalAlignment.Stretch,
     };
     _dialog.InputBindings.Add(new KeyBinding(InlineModalDialog.CloseCommand, Key.Escape, ModifierKeys.None));
     _dialog.Show();
 }
Esempio n. 3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new InlineModalDialog
            {
                Owner   = this,
                Content = new DialogSampleContent(),
                Width   = _rng.Next(100, (int)ActualWidth),
                Height  = _rng.Next(100, (int)ActualHeight),
            };

            dialog.InputBindings.Add(new KeyBinding {
                Key = Key.Escape, Command = InlineModalDialog.CloseCommand
            });
            dialog.Show();
        }