2
0
Tig 9 сар өмнө
parent
commit
78d0a8fc3b
100 өөрчлөгдсөн 308 нэмэгдсэн , 308 устгасан
  1. 2 2
      CommunityToolkitExample/LoginView.cs
  2. 1 1
      Example/Example.cs
  3. 1 1
      NativeAot/Program.cs
  4. 2 2
      ReactiveExample/LoginView.cs
  5. 1 1
      SelfContained/Program.cs
  6. 2 2
      Terminal.Gui/FileServices/DefaultFileOperations.cs
  7. 1 1
      Terminal.Gui/Input/Command.cs
  8. 12 12
      Terminal.Gui/View/View.Command.cs
  9. 1 1
      Terminal.Gui/View/View.Keyboard.cs
  10. 6 6
      Terminal.Gui/Views/Button.cs
  11. 1 1
      Terminal.Gui/Views/CheckBox.cs
  12. 3 3
      Terminal.Gui/Views/ColorPicker.cs
  13. 2 2
      Terminal.Gui/Views/ComboBox.cs
  14. 2 2
      Terminal.Gui/Views/DatePicker.cs
  15. 6 6
      Terminal.Gui/Views/FileDialog.cs
  16. 1 1
      Terminal.Gui/Views/ListView.cs
  17. 1 1
      Terminal.Gui/Views/Menu/MenuBar.cs
  18. 1 1
      Terminal.Gui/Views/Menuv2.cs
  19. 1 1
      Terminal.Gui/Views/MessageBox.cs
  20. 2 2
      Terminal.Gui/Views/NumericUpDown.cs
  21. 2 2
      Terminal.Gui/Views/RadioGroup.cs
  22. 5 5
      Terminal.Gui/Views/Shortcut.cs
  23. 1 1
      Terminal.Gui/Views/Slider.cs
  24. 3 3
      Terminal.Gui/Views/StatusBar.cs
  25. 2 2
      Terminal.Gui/Views/TextView.cs
  26. 1 1
      Terminal.Gui/Views/TreeView/TreeView.cs
  27. 2 2
      Terminal.Gui/Views/Wizard/Wizard.cs
  28. 3 3
      UICatalog/KeyBindingsDialog.cs
  29. 2 2
      UICatalog/Scenarios/ASCIICustomButton.cs
  30. 1 1
      UICatalog/Scenarios/AdornmentEditor.cs
  31. 3 3
      UICatalog/Scenarios/Adornments.cs
  32. 4 4
      UICatalog/Scenarios/AllViewsTester.cs
  33. 5 5
      UICatalog/Scenarios/Bars.cs
  34. 16 16
      UICatalog/Scenarios/Buttons.cs
  35. 8 8
      UICatalog/Scenarios/CharacterMap.cs
  36. 1 1
      UICatalog/Scenarios/ChineseUI.cs
  37. 1 1
      UICatalog/Scenarios/Clipping.cs
  38. 2 2
      UICatalog/Scenarios/ComboBoxIteration.cs
  39. 4 4
      UICatalog/Scenarios/ComputedLayout.cs
  40. 1 1
      UICatalog/Scenarios/ConfigurationEditor.cs
  41. 1 1
      UICatalog/Scenarios/ContentScrolling.cs
  42. 2 2
      UICatalog/Scenarios/CsvEditor.cs
  43. 5 5
      UICatalog/Scenarios/Dialogs.cs
  44. 1 1
      UICatalog/Scenarios/DimAutoDemo.cs
  45. 16 16
      UICatalog/Scenarios/DynamicMenuBar.cs
  46. 11 11
      UICatalog/Scenarios/DynamicStatusBar.cs
  47. 5 5
      UICatalog/Scenarios/Editor.cs
  48. 1 1
      UICatalog/Scenarios/FileDialogExamples.cs
  49. 1 1
      UICatalog/Scenarios/GraphViewExample.cs
  50. 1 1
      UICatalog/Scenarios/Images.cs
  51. 2 2
      UICatalog/Scenarios/InteractiveTree.cs
  52. 1 1
      UICatalog/Scenarios/InvertColors.cs
  53. 3 3
      UICatalog/Scenarios/LineDrawing.cs
  54. 2 2
      UICatalog/Scenarios/ListColumns.cs
  55. 1 1
      UICatalog/Scenarios/ListViewWithSelection.cs
  56. 2 2
      UICatalog/Scenarios/ListsAndCombos.cs
  57. 3 3
      UICatalog/Scenarios/Localization.cs
  58. 3 3
      UICatalog/Scenarios/MenuBarScenario.cs
  59. 1 1
      UICatalog/Scenarios/MessageBoxes.cs
  60. 1 1
      UICatalog/Scenarios/Mouse.cs
  61. 2 2
      UICatalog/Scenarios/MultiColouredTable.cs
  62. 3 3
      UICatalog/Scenarios/NumericUpDownDemo.cs
  63. 4 4
      UICatalog/Scenarios/Progress.cs
  64. 3 3
      UICatalog/Scenarios/ProgressBarStyles.cs
  65. 1 1
      UICatalog/Scenarios/RunTExample.cs
  66. 6 6
      UICatalog/Scenarios/RuneWidthGreaterThanOne.cs
  67. 3 3
      UICatalog/Scenarios/Scrolling.cs
  68. 1 1
      UICatalog/Scenarios/SendKeys.cs
  69. 4 4
      UICatalog/Scenarios/Shortcuts.cs
  70. 1 1
      UICatalog/Scenarios/SingleBackgroundWorker.cs
  71. 1 1
      UICatalog/Scenarios/Sliders.cs
  72. 4 4
      UICatalog/Scenarios/TableEditor.cs
  73. 1 1
      UICatalog/Scenarios/Text.cs
  74. 8 8
      UICatalog/Scenarios/Threading.cs
  75. 1 1
      UICatalog/Scenarios/TimeAndDate.cs
  76. 2 2
      UICatalog/Scenarios/VkeyPacketSimulator.cs
  77. 2 2
      UICatalog/Scenarios/WindowsAndFrameViews.cs
  78. 1 1
      UICatalog/Scenarios/WizardAsView.cs
  79. 3 3
      UICatalog/Scenarios/Wizards.cs
  80. 1 1
      UICatalog/UICatalog.cs
  81. 3 3
      UnitTests/Application/MainLoopTests.cs
  82. 4 4
      UnitTests/Dialogs/DialogTests.cs
  83. 2 2
      UnitTests/Dialogs/MessageBoxTests.cs
  84. 1 1
      UnitTests/View/HotKeyTests.cs
  85. 1 1
      UnitTests/View/Navigation/EnabledTests.cs
  86. 1 1
      UnitTests/View/Navigation/HasFocusTests.cs
  87. 4 4
      UnitTests/View/ViewCommandTests.cs
  88. 3 3
      UnitTests/Views/AllViewsTests.cs
  89. 10 10
      UnitTests/Views/ButtonTests.cs
  90. 5 5
      UnitTests/Views/CheckBoxTests.cs
  91. 1 1
      UnitTests/Views/LabelTests.cs
  92. 3 3
      UnitTests/Views/ListViewTests.cs
  93. 1 1
      UnitTests/Views/MenuBarTests.cs
  94. 8 8
      UnitTests/Views/RadioGroupTests.cs
  95. 1 1
      UnitTests/Views/ScrollBarViewTests.cs
  96. 10 10
      UnitTests/Views/ShortcutTests.cs
  97. 8 8
      UnitTests/Views/TextFieldTests.cs
  98. 7 7
      UnitTests/Views/TextViewTests.cs
  99. 1 1
      UnitTests/Views/ToplevelTests.cs
  100. 3 3
      UnitTests/Views/TreeViewTests.cs

+ 2 - 2
CommunityToolkitExample/LoginView.cs

@@ -19,13 +19,13 @@ internal partial class LoginView : IRecipient<Message<LoginActions>>
                                      {
                                          ViewModel.Password = passwordInput.Text;
                                      };
-        loginButton.Accepted += (_, _) =>
+        loginButton.Accepting += (_, _) =>
                               {
                                   if (!ViewModel.CanLogin) { return; }
                                   ViewModel.LoginCommand.Execute (null);
                               };
 
-        clearButton.Accepted += (_, _) =>
+        clearButton.Accepting += (_, _) =>
                               {
                                   ViewModel.ClearCommand.Execute (null);
                               };

+ 1 - 1
Example/Example.cs

@@ -63,7 +63,7 @@ public class ExampleWindow : Window
         };
 
         // When login button is clicked display a message popup
-        btnLogin.Accepted += (s, e) =>
+        btnLogin.Accepting += (s, e) =>
                            {
                                if (userNameText.Text == "admin" && passwordText.Text == "password")
                                {

+ 1 - 1
NativeAot/Program.cs

@@ -93,7 +93,7 @@ public class ExampleWindow : Window
         };
 
         // When login button is clicked display a message popup
-        btnLogin.Accepted += (s, e) =>
+        btnLogin.Accepting += (s, e) =>
         {
             if (userNameText.Text == "admin" && passwordText.Text == "password")
             {

+ 2 - 2
ReactiveExample/LoginView.cs

@@ -108,7 +108,7 @@ public class LoginView : Window, IViewFor<LoginViewModel>
 
                 login
                     .Events ()
-                    .Accepted
+                    .Accepting
                     .InvokeCommand (ViewModel, x => x.Login)
                     .DisposeWith (_disposable);
             })
@@ -120,7 +120,7 @@ public class LoginView : Window, IViewFor<LoginViewModel>
 
                 clear
                     .Events ()
-                    .Accepted
+                    .Accepting
                     .InvokeCommand (ViewModel, x => x.ClearCommand)
                     .DisposeWith (_disposable);
             })

+ 1 - 1
SelfContained/Program.cs

@@ -92,7 +92,7 @@ public class ExampleWindow : Window
         };
 
         // When login button is clicked display a message popup
-        btnLogin.Accepted += (s, e) =>
+        btnLogin.Accepting += (s, e) =>
                            {
                                if (userNameText.Text == "admin" && passwordText.Text == "password")
                                {

+ 2 - 2
Terminal.Gui/FileServices/DefaultFileOperations.cs

@@ -135,14 +135,14 @@ public class DefaultFileOperations : IFileOperations
         var confirm = false;
         var btnOk = new Button { IsDefault = true, Text = Strings.btnOk };
 
-        btnOk.Accepted += (s, e) =>
+        btnOk.Accepting += (s, e) =>
                          {
                              confirm = true;
                              Application.RequestStop ();
                          };
         var btnCancel = new Button { Text = Strings.btnCancel };
 
-        btnCancel.Accepted += (s, e) =>
+        btnCancel.Accepting += (s, e) =>
                              {
                                  confirm = false;
                                  Application.RequestStop ();

+ 1 - 1
Terminal.Gui/Input/Command.cs

@@ -14,7 +14,7 @@ public enum Command
     /// <summary>
     ///     Accepts the current state of the View (e.g. list selection, button press, checkbox state, etc.).
     ///     <para>
-    ///         The default implementation in <see cref="View"/> calls <see cref="View.RaiseAccepted"/>. If the event is not handled,
+    ///         The default implementation in <see cref="View"/> calls <see cref="View.RaiseAccepting"/>. If the event is not handled,
     ///         the command is invoked on:
     ///             - Any peer-view that is a <see cref="Button"/> with <see cref="Button.IsDefault"/> set to <see langword="true"/>.
     ///             - The <see cref="View.SuperView"/>. This enables default Accept behavior.

+ 12 - 12
Terminal.Gui/View/View.Command.cs

@@ -13,7 +13,7 @@ public partial class View // Command APIs
     private void SetupCommands ()
     {
         // Enter - Raise Accepted
-        AddCommand (Command.Accept, RaiseAccepted);
+        AddCommand (Command.Accept, RaiseAccepting);
 
         // HotKey - SetFocus and raise HandlingHotKey
         AddCommand (Command.HotKey,
@@ -49,28 +49,28 @@ public partial class View // Command APIs
     }
 
     /// <summary>
-    ///     Called when the user is accepting the state of the View and the <see cref="Command.Accept"/> has been invoked. Calls <see cref="OnAccepted"/> which can be cancelled; if not cancelled raises <see cref="Accepted"/>.
+    ///     Called when the user is accepting the state of the View and the <see cref="Command.Accept"/> has been invoked. Calls <see cref="OnAccepting"/> which can be cancelled; if not cancelled raises <see cref="Accepting"/>.
     ///     event. The default <see cref="Command.Accept"/> handler calls this method.
     /// </summary>
     /// <remarks>
-    ///     The <see cref="Accepted"/> event should raised after the state of the View has changed (after <see cref="Selecting"/> is raised).
+    ///     The <see cref="Accepting"/> event should raised after the state of the View has changed (after <see cref="Selecting"/> is raised).
     /// </remarks>
     /// <returns>
     ///     If <see langword="true"/> the event was canceled. If <see langword="false"/> the event was raised but not canceled.
     ///     If <see langword="null"/> no event was raised.
     /// </returns>
-    protected bool? RaiseAccepted ()
+    protected bool? RaiseAccepting ()
     {
         CommandEventArgs args = new ();
 
         // Best practice is to invoke the virtual method first.
         // This allows derived classes to handle the event and potentially cancel it.
-        args.Cancel = OnAccepted (args) || args.Cancel;
+        args.Cancel = OnAccepting (args) || args.Cancel;
 
         if (!args.Cancel)
         {
             // If the event is not canceled by the virtual method, raise the event to notify any external subscribers.
-            Accepted?.Invoke (this, args);
+            Accepting?.Invoke (this, args);
         }
 
         // Accept is a special case where if the event is not canceled, the event is
@@ -93,7 +93,7 @@ public partial class View // Command APIs
             return SuperView?.InvokeCommand (Command.Accept, ctx: new (Command.Accept, null, null, this)) == true;
         }
 
-        return Accepted is null ? null : args.Cancel;
+        return Accepting is null ? null : args.Cancel;
     }
 
     /// <summary>
@@ -102,20 +102,20 @@ public partial class View // Command APIs
     /// </summary>
     /// <param name="args"></param>
     /// <returns><see langword="true"/> to stop processing.</returns>
-    protected virtual bool OnAccepted (CommandEventArgs args) { return false; }
+    protected virtual bool OnAccepting (CommandEventArgs args) { return false; }
 
     /// <summary>
     ///     Cancelable event raised when the user is accepting the state of the View and the <see cref="Command.Accept"/> has been invoked. Set
     ///     <see cref="CommandEventArgs.Cancel"/> to cancel the event.
     /// </summary>
-    public event EventHandler<CommandEventArgs>? Accepted;
+    public event EventHandler<CommandEventArgs>? Accepting;
 
     /// <summary>
-    ///     Called when the user has performed an action (e.g. <see cref="Command.Select"/>) causing the View to change state. Calls <see cref="OnSelecting"/> which can be cancelled; if not cancelled raises <see cref="Accepted"/>.
+    ///     Called when the user has performed an action (e.g. <see cref="Command.Select"/>) causing the View to change state. Calls <see cref="OnSelecting"/> which can be cancelled; if not cancelled raises <see cref="Accepting"/>.
     ///     event. The default <see cref="Command.Select"/> handler calls this method.
     /// </summary>
     /// <remarks>
-    ///     The <see cref="Selecting"/> event should raised after the state of the View has been changed and before see <see cref="Accepted"/>.
+    ///     The <see cref="Selecting"/> event should raised after the state of the View has been changed and before see <see cref="Accepting"/>.
     /// </remarks>
     /// <returns>
     ///     If <see langword="true"/> the event was canceled. If <see langword="false"/> the event was raised but not canceled.
@@ -155,7 +155,7 @@ public partial class View // Command APIs
     public event EventHandler<CommandEventArgs>? Selecting;
 
     /// <summary>
-    ///     Called when the View is handling the user pressing the View's <see cref="HotKey"/>s. Calls <see cref="OnHandlingHotKey"/> which can be cancelled; if not cancelled raises <see cref="Accepted"/>.
+    ///     Called when the View is handling the user pressing the View's <see cref="HotKey"/>s. Calls <see cref="OnHandlingHotKey"/> which can be cancelled; if not cancelled raises <see cref="Accepting"/>.
     ///     event. The default <see cref="Command.HotKey"/> handler calls this method.
     /// </summary>
     /// <returns>

+ 1 - 1
Terminal.Gui/View/View.Keyboard.cs

@@ -39,7 +39,7 @@ public partial class View // Keyboard APIs
     ///     <para>
     ///         A HotKey is a keypress that causes a visible UI item to perform an action. For example, in a Dialog,
     ///         with a Button with the text of "_Text" <c>Alt+T</c> will cause the button to gain focus and to raise its
-    ///         <see cref="Accepted"/> event.
+    ///         <see cref="Accepting"/> event.
     ///         Or, in a
     ///         <see cref="Menu"/> with "_File _Edit", <c>Alt+F</c> will select (show) the "_File" menu. If the "_File" menu
     ///         has a

+ 6 - 6
Terminal.Gui/Views/Button.cs

@@ -8,12 +8,12 @@
 namespace Terminal.Gui;
 
 /// <summary>
-///     A View that raises the <see cref="View.Accepted"/> event when clicked with the mouse or when the
+///     A View that raises the <see cref="View.Accepting"/> event when clicked with the mouse or when the
 ///     <see cref="View.HotKey"/>, <c>Enter</c>, or <c>Space</c> key is pressed.
 /// </summary>
 /// <remarks>
 ///     <para>
-///         Provides a button showing text that raises the <see cref="View.Accepted"/> event when clicked on with a mouse or
+///         Provides a button showing text that raises the <see cref="View.Accepting"/> event when clicked on with a mouse or
 ///         when the user presses <c>Enter</c>, <c>Space</c> or the <see cref="View.HotKey"/>. The hot key is the first
 ///         letter or digit
 ///         following the first underscore ('_') in the button text.
@@ -21,13 +21,13 @@ namespace Terminal.Gui;
 ///     <para>Use <see cref="View.HotKeySpecifier"/> to change the hot key specifier from the default of ('_').</para>
 ///     <para>
 ///         When the button is configured as the default (<see cref="IsDefault"/>) and the user causes the button to be
-///         accepted the <see cref="Button"/>'s <see cref="View.Accepted"/> event will be raised. If the Accept event is not
+///         accepted the <see cref="Button"/>'s <see cref="View.Accepting"/> event will be raised. If the Accept event is not
 ///         handled, the Accept event on the <see cref="View.SuperView"/>. will be raised. This enables default Accept
 ///         behavior.
 ///     </para>
 ///     <para>
 ///         Set <see cref="View.WantContinuousButtonPressed"/> to <see langword="true"/> to have the
-///         <see cref="View.Accepted"/> event
+///         <see cref="View.Accepting"/> event
 ///         invoked repeatedly while the button is pressed.
 ///     </para>
 /// </remarks>
@@ -90,7 +90,7 @@ public class Button : View, IDesignable
             return true;
         }
 
-        bool? handled = RaiseAccepted ();
+        bool? handled = RaiseAccepting ();
 
         if (handled == true)
         {
@@ -170,7 +170,7 @@ public class Button : View, IDesignable
     ///     <see langword="true"/>
     ///     <see cref="Command.Accept"/> will be invoked when the user presses <c>Enter</c> and no other peer-
     ///     <see cref="View"/> processes the key.
-    ///     If <see cref="View.Accepted"/> is not handled, the Gets or sets whether the <see cref="Button"/> will show an
+    ///     If <see cref="View.Accepting"/> is not handled, the Gets or sets whether the <see cref="Button"/> will show an
     ///     indicator indicating it is the default Button. If <see langword="true"/>
     ///     <see cref="Command.Accept"/> command on the <see cref="View.SuperView"/> will be invoked.
     /// </summary>

+ 1 - 1
Terminal.Gui/Views/CheckBox.cs

@@ -27,7 +27,7 @@ public class CheckBox : View
         AddCommand (Command.HotKey, AdvanceAndSelect);
 
         // Accept (Enter key) - Raise Accept event - DO NOT advance state
-        AddCommand (Command.Accept, RaiseAccepted);
+        AddCommand (Command.Accept, RaiseAccepting);
 
         TitleChanged += Checkbox_TitleChanged;
 

+ 3 - 3
Terminal.Gui/Views/ColorPicker.cs

@@ -64,7 +64,7 @@ public class ColorPicker : View
                     Width = textFieldWidth
                 };
                 tfValue.HasFocusChanged += UpdateSingleBarValueFromTextField;
-                tfValue.Accepted += (s, _)=>UpdateSingleBarValueFromTextField(s);
+                tfValue.Accepting += (s, _)=>UpdateSingleBarValueFromTextField(s);
                 _textFields.Add (bar, tfValue);
             }
 
@@ -154,7 +154,7 @@ public class ColorPicker : View
         _tfName.Autocomplete = auto;
 
         _tfName.HasFocusChanged += UpdateValueFromName;
-        _tfName.Accepted += (s, _) => UpdateValueFromName ();
+        _tfName.Accepting += (s, _) => UpdateValueFromName ();
     }
 
     private void CreateTextField ()
@@ -184,7 +184,7 @@ public class ColorPicker : View
         Add (_tfHex);
 
         _tfHex.HasFocusChanged += UpdateValueFromTextField;
-        _tfHex.Accepted += (_,_)=> UpdateValueFromTextField();
+        _tfHex.Accepting += (_,_)=> UpdateValueFromTextField();
     }
 
     private void DisposeOldViews ()

+ 2 - 2
Terminal.Gui/Views/ComboBox.cs

@@ -36,7 +36,7 @@ public class ComboBox : View, IDesignable
 
         _listview.Y = Pos.Bottom (_search);
         _listview.OpenSelectedItem += (sender, a) => SelectText ();
-        _listview.Accepted += (sender, args) =>
+        _listview.Accepting += (sender, args) =>
                               {
                                   // This prevents Accepted from bubbling up to the combobox
                                   args.Cancel = true;
@@ -401,7 +401,7 @@ public class ComboBox : View, IDesignable
                 return false;
             }
 
-            return RaiseAccepted () == true;
+            return RaiseAccepting () == true;
         }
 
         return false;

+ 2 - 2
Terminal.Gui/Views/DatePicker.cs

@@ -227,7 +227,7 @@ public class DatePicker : View
             ShadowStyle = ShadowStyle.None
         };
 
-        _previousMonthButton.Accepted += (sender, e) =>
+        _previousMonthButton.Accepting += (sender, e) =>
                                         {
                                             Date = _date.AddMonths (-1);
                                             CreateCalendar ();
@@ -247,7 +247,7 @@ public class DatePicker : View
             ShadowStyle = ShadowStyle.None
         };
 
-        _nextMonthButton.Accepted += (sender, e) =>
+        _nextMonthButton.Accepting += (sender, e) =>
                                     {
                                         Date = _date.AddMonths (1);
                                         CreateCalendar ();

+ 6 - 6
Terminal.Gui/Views/FileDialog.cs

@@ -78,7 +78,7 @@ public class FileDialog : Dialog
             Y = Pos.AnchorEnd (),
             IsDefault = true, Text = Style.OkButtonText
         };
-        _btnOk.Accepted += (s, e) => Accept (true);
+        _btnOk.Accepting += (s, e) => Accept (true);
 
 
         _btnCancel = new Button
@@ -88,7 +88,7 @@ public class FileDialog : Dialog
             Text = Strings.btnCancel
         };
 
-        _btnCancel.Accepted += (s, e) =>
+        _btnCancel.Accepting += (s, e) =>
         {
             Canceled = true;
             Application.RequestStop ();
@@ -96,15 +96,15 @@ public class FileDialog : Dialog
 
         _btnUp = new Button { X = 0, Y = 1, NoPadding = true };
         _btnUp.Text = GetUpButtonText ();
-        _btnUp.Accepted += (s, e) => _history.Up ();
+        _btnUp.Accepting += (s, e) => _history.Up ();
 
         _btnBack = new Button { X = Pos.Right (_btnUp) + 1, Y = 1, NoPadding = true };
         _btnBack.Text = GetBackButtonText ();
-        _btnBack.Accepted += (s, e) => _history.Back ();
+        _btnBack.Accepting += (s, e) => _history.Back ();
 
         _btnForward = new Button { X = Pos.Right (_btnBack) + 1, Y = 1, NoPadding = true };
         _btnForward.Text = GetForwardButtonText ();
-        _btnForward.Accepted += (s, e) => _history.Forward ();
+        _btnForward.Accepting += (s, e) => _history.Forward ();
 
         _tbPath = new TextField { Width = Dim.Fill (), CaptionColor = new Color (Color.Black) };
 
@@ -182,7 +182,7 @@ public class FileDialog : Dialog
             Y = Pos.AnchorEnd (), Text = GetToggleSplitterText (false)
         };
 
-        _btnToggleSplitterCollapse.Accepted += (s, e) =>
+        _btnToggleSplitterCollapse.Accepting += (s, e) =>
                                               {
                                                   Tile tile = _splitContainer.Tiles.ElementAt (0);
 

+ 1 - 1
Terminal.Gui/Views/ListView.cs

@@ -140,7 +140,7 @@ public class ListView : View, IDesignable
         // Accept (Enter key) - Raise Accept event - DO NOT advance state
         AddCommand (Command.Accept, () =>
                                     {
-                                        if (RaiseAccepted () == true)
+                                        if (RaiseAccepting () == true)
                                         {
                                             return true;
                                         }

+ 1 - 1
Terminal.Gui/Views/Menu/MenuBar.cs

@@ -126,7 +126,7 @@ public class MenuBar : View, IDesignable
                             ProcessMenu (_selected, Menus [_selected]);
                         }
 
-                        return RaiseAccepted ();
+                        return RaiseAccepting ();
                     }
                    );
         AddCommand (Command.Toggle, ctx =>

+ 1 - 1
Terminal.Gui/Views/Menuv2.cs

@@ -76,7 +76,7 @@ public class Menuv2 : Bar
             // TODO: instead, add a property (a style enum?) to Shortcut to control this
             //shortcut.AlignmentModes = AlignmentModes.EndToStart;
 
-            shortcut.Accepted += ShortcutOnAccept;
+            shortcut.Accepting += ShortcutOnAccept;
 
             void ShortcutOnAccept (object sender, CommandEventArgs e)
             {

+ 1 - 1
Terminal.Gui/Views/MessageBox.cs

@@ -408,7 +408,7 @@ public static class MessageBox
             int buttonId = n;
             Button b = buttonList [n];
 
-            b.Accepted += (s, e) =>
+            b.Accepting += (s, e) =>
                          {
                              Clicked = buttonId;
                              Application.RequestStop ();

+ 2 - 2
Terminal.Gui/Views/NumericUpDown.cs

@@ -86,8 +86,8 @@ public class NumericUpDown<T> : View where T : notnull
 
         CanFocus = true;
 
-        _down.Accepted += OnDownButtonOnAccept;
-        _up.Accepted += OnUpButtonOnAccept;
+        _down.Accepting += OnDownButtonOnAccept;
+        _up.Accepting += OnUpButtonOnAccept;
 
         Add (_down, _number, _up);
 

+ 2 - 2
Terminal.Gui/Views/RadioGroup.cs

@@ -50,7 +50,7 @@ public class RadioGroup : View, IDesignable, IOrientation
                     });
 
         // Accept (Enter key) - Raise Accept event - DO NOT advance state
-        AddCommand (Command.Accept, () => RaiseAccepted ());
+        AddCommand (Command.Accept, () => RaiseAccepting ());
 
         // Hotkey - ctx may indicate a radio item hotkey was pressed. Beahvior depends on HasFocus
         //          If HasFocus and it's this.HotKey invoke Select command - DO NOT raise Accept
@@ -209,7 +209,7 @@ public class RadioGroup : View, IDesignable, IOrientation
     }
 
     /// <summary>
-    ///     Gets or sets whether double clicking on a Radio Item will cause the <see cref="View.Accepted"/> event to be raised.
+    ///     Gets or sets whether double clicking on a Radio Item will cause the <see cref="View.Accepting"/> event to be raised.
     /// </summary>
     /// <remarks>
     ///     <para>

+ 5 - 5
Terminal.Gui/Views/Shortcut.cs

@@ -12,7 +12,7 @@ namespace Terminal.Gui;
 /// <remarks>
 ///     <para>
 ///         The following user actions will invoke the <see cref="Command.Accept"/>, causing the
-///         <see cref="View.Accepted"/> event to be fired:
+///         <see cref="View.Accepting"/> event to be fired:
 ///         - Clicking on the <see cref="Shortcut"/>.
 ///         - Pressing the key specified by <see cref="Key"/>.
 ///         - Pressing the HotKey specified by <see cref="CommandView"/>.
@@ -344,7 +344,7 @@ public class Shortcut : View, IOrientation, IDesignable
 
         var cancel = false;
 
-        cancel = RaiseAccepted () is true;
+        cancel = RaiseAccepting () is true;
 
         if (cancel)
         {
@@ -372,7 +372,7 @@ public class Shortcut : View, IOrientation, IDesignable
     ///     mouse.
     /// </summary>
     /// <remarks>
-    ///     Note, the <see cref="View.Accepted"/> event is fired first, and if cancelled, the event will not be invoked.
+    ///     Note, the <see cref="View.Accepting"/> event is fired first, and if cancelled, the event will not be invoked.
     /// </remarks>
     public Action? Action { get; set; }
 
@@ -478,7 +478,7 @@ public class Shortcut : View, IOrientation, IDesignable
 
             // Clean up old 
             _commandView.Selecting -= CommandViewOnSelecting;
-            _commandView.Accepted -= CommandViewOnAccepted;
+            _commandView.Accepting -= CommandViewOnAccepted;
             Remove (_commandView);
             _commandView?.Dispose ();
 
@@ -505,7 +505,7 @@ public class Shortcut : View, IOrientation, IDesignable
 
             _commandView.Selecting += CommandViewOnSelecting;
 
-            _commandView.Accepted += CommandViewOnAccepted;
+            _commandView.Accepting += CommandViewOnAccepted;
 
             SetCommandViewDefaultLayout ();
             SetHelpViewDefaultLayout ();

+ 1 - 1
Terminal.Gui/Views/Slider.cs

@@ -1789,7 +1789,7 @@ public class Slider<T> : View, IOrientation
     {
         SetFocusedOption ();
 
-        return RaiseAccepted () == true;
+        return RaiseAccepting () == true;
     }
 
     internal bool MovePlus ()

+ 3 - 3
Terminal.Gui/Views/StatusBar.cs

@@ -113,10 +113,10 @@ public class StatusBar : Bar, IDesignable
             Text = "I'll Hide",
             // Visible = false
         };
-        button1.Accepted += Button_Clicked;
+        button1.Accepting += Button_Clicked;
         Add (button1);
 
-        shortcut.Accepted += (s, e) =>
+        shortcut.Accepting += (s, e) =>
                            {
                                button1.Visible = !button1.Visible;
                                button1.Enabled = button1.Visible;
@@ -134,7 +134,7 @@ public class StatusBar : Bar, IDesignable
         {
             Text = "Or me!",
         };
-        button2.Accepted += (s, e) => Application.RequestStop ();
+        button2.Accepting += (s, e) => Application.RequestStop ();
 
         Add (button2);
 

+ 2 - 2
Terminal.Gui/Views/TextView.cs

@@ -2517,7 +2517,7 @@ public class TextView : View
     // BUGBUG: AllowsReturn is mis-named. It should be EnterKeyAccepts.
     /// <summary>
     ///     Gets or sets whether pressing ENTER in a <see cref="TextView"/> creates a new line of text
-    ///     in the view or invokes the <see cref="View.Accepted"/> event.
+    ///     in the view or invokes the <see cref="View.Accepting"/> event.
     /// </summary>
     /// <remarks>
     ///     <para>
@@ -6054,7 +6054,7 @@ public class TextView : View
         {
             // By Default pressing ENTER should be ignored (OnAccept will return false or null). Only cancel if the
             // event was fired and set Cancel = true.
-            return RaiseAccepted () is null or false;
+            return RaiseAccepting () is null or false;
         }
 
         SetWrapModel ();

+ 1 - 1
Terminal.Gui/Views/TreeView/TreeView.cs

@@ -446,7 +446,7 @@ public class TreeView<T> : View, ITreeView where T : class
     public bool? ActivateSelectedObjectIfAny ()
     {
         // By default, Command.Accept calls OnAccept, so we need to call it here to ensure that the event is fired.
-        if (RaiseAccepted () == true)
+        if (RaiseAccepting () == true)
         {
             return true;
         }

+ 2 - 2
Terminal.Gui/Views/Wizard/Wizard.cs

@@ -85,8 +85,8 @@ public class Wizard : Dialog
         AddButton (BackButton);
         AddButton (NextFinishButton);
 
-        BackButton.Accepted += BackBtn_Clicked;
-        NextFinishButton.Accepted += NextfinishBtn_Clicked;
+        BackButton.Accepting += BackBtn_Clicked;
+        NextFinishButton.Accepting += NextfinishBtn_Clicked;
 
         Loaded += Wizard_Loaded;
         Closing += Wizard_Closing;

+ 3 - 3
UICatalog/KeyBindingsDialog.cs

@@ -44,11 +44,11 @@ internal class KeyBindingsDialog : Dialog
 
         var btnChange = new Button { X = Pos.Percent (50), Y = 1, Text = "Ch_ange" };
         Add (btnChange);
-        btnChange.Accepted += RemapKey;
+        btnChange.Accepting += RemapKey;
 
         var close = new Button { Text = "Ok" };
 
-        close.Accepted += (s, e) =>
+        close.Accepting += (s, e) =>
                          {
                              Application.RequestStop ();
                              ViewTracker.Instance.StartUsingNewKeyMap (CurrentBindings);
@@ -56,7 +56,7 @@ internal class KeyBindingsDialog : Dialog
         AddButton (close);
 
         var cancel = new Button { Text = "Cancel" };
-        cancel.Accepted += (s, e) => Application.RequestStop ();
+        cancel.Accepting += (s, e) => Application.RequestStop ();
         AddButton (cancel);
 
         // Register event handler as the last thing in constructor to prevent early calls

+ 2 - 2
UICatalog/Scenarios/ASCIICustomButton.cs

@@ -198,7 +198,7 @@ public class ASCIICustomButtonTest : Scenario
                     Height = BUTTON_HEIGHT
                 };
                 button.Initialized += Button_Initialized;
-                button.Accepted += Button_Clicked;
+                button.Accepting += Button_Clicked;
                 button.PointerEnter += Button_PointerEnter;
                 button.MouseClick += Button_MouseClick;
                 button.KeyDown += Button_KeyPress;
@@ -216,7 +216,7 @@ public class ASCIICustomButtonTest : Scenario
                 Height = BUTTON_HEIGHT
             };
             closeButton.Initialized += Button_Initialized;
-            closeButton.Accepted += Button_Clicked;
+            closeButton.Accepting += Button_Clicked;
             closeButton.PointerEnter += Button_PointerEnter;
             closeButton.MouseClick += Button_MouseClick;
             closeButton.KeyDown += Button_KeyPress;

+ 1 - 1
UICatalog/Scenarios/AdornmentEditor.cs

@@ -146,7 +146,7 @@ public class AdornmentEditor : View
             Enabled = false
         };
 
-        copyTop.Accepted += (s, e) =>
+        copyTop.Accepting += (s, e) =>
                           {
                               AdornmentToEdit.Thickness = new (_topEdit.Value);
                               _leftEdit.Value = _rightEdit.Value = _bottomEdit.Value = _topEdit.Value;

+ 3 - 3
UICatalog/Scenarios/Adornments.cs

@@ -57,7 +57,7 @@ public class Adornments : Scenario
 
         var button = new Button { X = Pos.Center (), Y = Pos.Center (), Text = "Press me!" };
 
-        button.Accepted += (s, e) =>
+        button.Accepting += (s, e) =>
                              MessageBox.Query (20, 7, "Hi", $"Am I a {window.GetType ().Name}?", "Yes", "No");
 
         var label = new TextView
@@ -113,7 +113,7 @@ public class Adornments : Scenario
                                       Text = "some text",
                                       CanFocus = true
                                   };
-                                  textFieldInPadding.Accepted += (s, e) => MessageBox.Query (20, 7, "TextField", textFieldInPadding.Text, "Ok");
+                                  textFieldInPadding.Accepting += (s, e) => MessageBox.Query (20, 7, "TextField", textFieldInPadding.Text, "Ok");
                                   window.Padding.Add (textFieldInPadding);
 
                                   var btnButtonInPadding = new Button
@@ -123,7 +123,7 @@ public class Adornments : Scenario
                                       Text = "_Button in Padding",
                                       CanFocus = true
                                   };
-                                  btnButtonInPadding.Accepted += (s, e) => MessageBox.Query (20, 7, "Hi", "Button in Padding Pressed!", "Ok");
+                                  btnButtonInPadding.Accepting += (s, e) => MessageBox.Query (20, 7, "Hi", "Button in Padding Pressed!", "Ok");
                                   btnButtonInPadding.BorderStyle = LineStyle.Dashed;
                                   btnButtonInPadding.Border.Thickness = new (1, 1, 1, 1);
                                   window.Padding.Add (btnButtonInPadding);

+ 4 - 4
UICatalog/Scenarios/AllViewsTester.cs

@@ -160,7 +160,7 @@ public class AllViewsTester : Scenario
         _xRadioGroup.SelectedItemChanged += OnXRadioGroupOnSelectedItemChanged;
         _xText = new () { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_xVal}" };
 
-        _xText.Accepted += (s, args) =>
+        _xText.Accepting += (s, args) =>
                          {
                              try
                              {
@@ -179,7 +179,7 @@ public class AllViewsTester : Scenario
         _locationFrame.Add (label);
         _yText = new () { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_yVal}" };
 
-        _yText.Accepted += (s, args) =>
+        _yText.Accepting += (s, args) =>
                          {
                              try
                              {
@@ -211,7 +211,7 @@ public class AllViewsTester : Scenario
         _wRadioGroup.SelectedItemChanged += OnWRadioGroupOnSelectedItemChanged;
         _wText = new () { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_wVal}" };
 
-        _wText.Accepted += (s, args) =>
+        _wText.Accepting += (s, args) =>
                          {
                              try
                              {
@@ -242,7 +242,7 @@ public class AllViewsTester : Scenario
         _sizeFrame.Add (label);
         _hText = new () { X = Pos.Right (label) + 1, Y = 0, Width = 4, Text = $"{_hVal}" };
 
-        _hText.Accepted += (s, args) =>
+        _hText.Accepting += (s, args) =>
                          {
                              try
                              {

+ 5 - 5
UICatalog/Scenarios/Bars.cs

@@ -168,7 +168,7 @@ public class Bars : Scenario
         };
         popOverMenu.Add (toggleShortcut);
 
-        popOverMenu.Accepted += PopOverMenuOnAccept;
+        popOverMenu.Accepting += PopOverMenuOnAccept;
 
         void PopOverMenuOnAccept (object o, CommandEventArgs args)
         {
@@ -255,7 +255,7 @@ public class Bars : Scenario
             {
                 foreach (Shortcut sh in barView.Subviews.Where (s => s is Shortcut)!)
                 {
-                    sh.Accepted += (o, args) =>
+                    sh.Accepting += (o, args) =>
                                  {
                                      eventSource.Add ($"Accept: {sh!.SuperView.Id} {sh!.CommandView.Text}");
                                      eventLog.MoveDown ();
@@ -522,10 +522,10 @@ public class Bars : Scenario
             Text = "I'll Hide",
             // Visible = false
         };
-        button1.Accepted += Button_Clicked;
+        button1.Accepting += Button_Clicked;
         bar.Add (button1);
 
-        shortcut.Accepted += (s, e) =>
+        shortcut.Accepting += (s, e) =>
                                                     {
                                                         button1.Visible = !button1.Visible;
                                                         button1.Enabled = button1.Visible;
@@ -543,7 +543,7 @@ public class Bars : Scenario
         {
             Text = "Or me!",
         };
-        button2.Accepted += (s, e) => Application.RequestStop ();
+        button2.Accepting += (s, e) => Application.RequestStop ();
 
         bar.Add (button2);
 

+ 16 - 16
UICatalog/Scenarios/Buttons.cs

@@ -36,7 +36,7 @@ public class Buttons : Scenario
         main.Add (defaultButton);
 
         // Note we handle Accept on main, not defaultButton
-        main.Accepted += (s, e) => Application.RequestStop ();
+        main.Accepting += (s, e) => Application.RequestStop ();
 
         var swapButton = new Button
         {
@@ -47,14 +47,14 @@ public class Buttons : Scenario
             ColorScheme = Colors.ColorSchemes ["Error"]
         };
 
-        swapButton.Accepted += (s, e) =>
+        swapButton.Accepting += (s, e) =>
                              {
                                  e.Cancel = !swapButton.IsDefault;
                                  defaultButton.IsDefault = !defaultButton.IsDefault;
                                  swapButton.IsDefault = !swapButton.IsDefault;
                              };
 
-        defaultButton.Accepted += (s, e) =>
+        defaultButton.Accepting += (s, e) =>
                                 {
                                     e.Cancel = !defaultButton.IsDefault;
 
@@ -67,7 +67,7 @@ public class Buttons : Scenario
 
         static void DoMessage (Button button, string txt)
         {
-            button.Accepted += (s, e) =>
+            button.Accepting += (s, e) =>
                              {
                                  string btnText = button.Text;
                                  MessageBox.Query ("Message", $"Did you click {txt}?", "Yes", "No");
@@ -111,7 +111,7 @@ public class Buttons : Scenario
         main.Add (
                   button = new () { X = 2, Y = Pos.Bottom (button) + 1, Height = 2, Text = "a Newline\nin the button" }
                  );
-        button.Accepted += (s, e) =>
+        button.Accepting += (s, e) =>
                          {
                              MessageBox.Query ("Message", "Question?", "Yes", "No");
                              e.Cancel = true;
@@ -119,7 +119,7 @@ public class Buttons : Scenario
 
         var textChanger = new Button { X = 2, Y = Pos.Bottom (button) + 1, Text = "Te_xt Changer" };
         main.Add (textChanger);
-        textChanger.Accepted += (s, e) =>
+        textChanger.Accepting += (s, e) =>
                               {
                                   textChanger.Text += "!";
                                   e.Cancel = true;
@@ -133,7 +133,7 @@ public class Buttons : Scenario
                       Text = "Lets see if this will move as \"Text Changer\" grows"
                   }
                  );
-        button.Accepted += (sender, args) => { args.Cancel = true; };
+        button.Accepting += (sender, args) => { args.Cancel = true; };
 
         var removeButton = new Button
         {
@@ -143,7 +143,7 @@ public class Buttons : Scenario
         main.Add (removeButton);
 
         // This in interesting test case because `moveBtn` and below are laid out relative to this one!
-        removeButton.Accepted += (s, e) =>
+        removeButton.Accepting += (s, e) =>
                                {
                                    removeButton.Visible = false;
                                    e.Cancel = true;
@@ -169,7 +169,7 @@ public class Buttons : Scenario
             Text = "Move This \u263b Button v_ia Pos"
         };
 
-        moveBtn.Accepted += (s, e) =>
+        moveBtn.Accepting += (s, e) =>
                           {
                               moveBtn.X = moveBtn.Frame.X + 5;
                               e.Cancel = true;
@@ -186,7 +186,7 @@ public class Buttons : Scenario
             ColorScheme = Colors.ColorSchemes ["Error"],
         };
 
-        sizeBtn.Accepted += (s, e) =>
+        sizeBtn.Accepting += (s, e) =>
                           {
                               sizeBtn.Width = sizeBtn.Frame.Width + 5;
                               e.Cancel = true;
@@ -206,7 +206,7 @@ public class Buttons : Scenario
         // Demonstrates how changing the View.Frame property can move Views
         var moveBtnA = new Button { ColorScheme = Colors.ColorSchemes ["Error"], Text = "Move This Button via Frame" };
 
-        moveBtnA.Accepted += (s, e) =>
+        moveBtnA.Accepting += (s, e) =>
                            {
                                moveBtnA.Frame = new (
                                                      moveBtnA.Frame.X + 5,
@@ -224,7 +224,7 @@ public class Buttons : Scenario
             Y = 2, ColorScheme = Colors.ColorSchemes ["Error"], Text = " ~  s  gui.cs   master ↑_10 = Сохранить"
         };
 
-        sizeBtnA.Accepted += (s, e) =>
+        sizeBtnA.Accepting += (s, e) =>
                            {
                                sizeBtnA.Frame = new (
                                                      sizeBtnA.Frame.X,
@@ -297,7 +297,7 @@ public class Buttons : Scenario
             ColorScheme = Colors.ColorSchemes ["TopLevel"],
             Text = mhkb
         };
-        moveHotKeyBtn.Accepted += (s, e) =>
+        moveHotKeyBtn.Accepting += (s, e) =>
                                 {
                                     moveHotKeyBtn.Text = MoveHotkey (moveHotKeyBtn.Text);
                                     e.Cancel = true;
@@ -314,7 +314,7 @@ public class Buttons : Scenario
             ColorScheme = Colors.ColorSchemes ["TopLevel"],
             Text = muhkb
         };
-        moveUnicodeHotKeyBtn.Accepted += (s, e) =>
+        moveUnicodeHotKeyBtn.Accepting += (s, e) =>
                                        {
                                            moveUnicodeHotKeyBtn.Text = MoveHotkey (moveUnicodeHotKeyBtn.Text);
                                            e.Cancel = true;
@@ -398,7 +398,7 @@ public class Buttons : Scenario
             Title = $"Accept Cou_nt: {noRepeatAcceptCount}",
             WantContinuousButtonPressed = false
         };
-        noRepeatButton.Accepted += (s, e) =>
+        noRepeatButton.Accepting += (s, e) =>
                                  {
                                      noRepeatButton.Title = $"Accept Cou_nt: {++noRepeatAcceptCount}";
                                      e.Cancel = true;
@@ -420,7 +420,7 @@ public class Buttons : Scenario
             Title = $"Accept Co_unt: {acceptCount}",
             WantContinuousButtonPressed = true
         };
-        repeatButton.Accepted += (s, e) =>
+        repeatButton.Accepting += (s, e) =>
                                {
                                    repeatButton.Title = $"Accept Co_unt: {++acceptCount}";
                                    e.Cancel = true;

+ 8 - 8
UICatalog/Scenarios/CharacterMap.cs

@@ -77,7 +77,7 @@ public class CharacterMap : Scenario
         };
         top.Add (_errorLabel);
 
-        jumpEdit.Accepted += JumpEditOnAccept;
+        jumpEdit.Accepting += JumpEditOnAccept;
 
         _categoryList = new () { X = Pos.Right (_charMap), Y = Pos.Bottom (jumpLabel), Height = Dim.Fill () };
         _categoryList.FullRowSelect = true;
@@ -477,7 +477,7 @@ internal class CharMap : View
             ShadowStyle = ShadowStyle.None,
             CanFocus = false
         };
-        up.Accepted += (sender, args) => { args.Cancel = ScrollVertical (-1) == true; };
+        up.Accepting += (sender, args) => { args.Cancel = ScrollVertical (-1) == true; };
 
         var down = new Button
         {
@@ -492,7 +492,7 @@ internal class CharMap : View
             ShadowStyle = ShadowStyle.None,
             CanFocus = false
         };
-        down.Accepted += (sender, args) => { ScrollVertical (1); };
+        down.Accepting += (sender, args) => { ScrollVertical (1); };
 
         var left = new Button
         {
@@ -507,7 +507,7 @@ internal class CharMap : View
             ShadowStyle = ShadowStyle.None,
             CanFocus = false
         };
-        left.Accepted += (sender, args) => { ScrollHorizontal (-1); };
+        left.Accepting += (sender, args) => { ScrollHorizontal (-1); };
 
         var right = new Button
         {
@@ -522,7 +522,7 @@ internal class CharMap : View
             ShadowStyle = ShadowStyle.None,
             CanFocus = false
         };
-        right.Accepted += (sender, args) => { ScrollHorizontal (1); };
+        right.Accepting += (sender, args) => { ScrollHorizontal (1); };
 
         Padding.Add (up, down, left, right);
     }
@@ -1015,18 +1015,18 @@ internal class CharMap : View
 
             var dlg = new Dialog { Title = title, Buttons = [copyGlyph, copyCP, cancel] };
 
-            copyGlyph.Accepted += (s, a) =>
+            copyGlyph.Accepting += (s, a) =>
                                 {
                                     CopyGlyph ();
                                     dlg.RequestStop ();
                                 };
 
-            copyCP.Accepted += (s, a) =>
+            copyCP.Accepting += (s, a) =>
                              {
                                  CopyCodePoint ();
                                  dlg.RequestStop ();
                              };
-            cancel.Accepted += (s, a) => dlg.RequestStop ();
+            cancel.Accepting += (s, a) => dlg.RequestStop ();
 
             var rune = (Rune)SelectedCodePoint;
             var label = new Label { Text = "IsAscii: ", X = 0, Y = 0 };

+ 1 - 1
UICatalog/Scenarios/ChineseUI.cs

@@ -31,7 +31,7 @@ public class ChineseUI : Scenario
 
         var btn = new Button { X = 1, Y = 1, Text = "你" }; // v1: A
 
-        btn.Accepted += (s, e) =>
+        btn.Accepting += (s, e) =>
                       {
                           int result = MessageBox.Query (
                                                          "Confirm",

+ 1 - 1
UICatalog/Scenarios/Clipping.cs

@@ -70,7 +70,7 @@ public class Clipping : Scenario
         };
 
         var testButton = new Button { X = 2, Y = 2, Text = "click me" };
-        testButton.Accepted += (s, e) => { MessageBox.Query (10, 5, "Test", "test message", "Ok"); };
+        testButton.Accepting += (s, e) => { MessageBox.Query (10, 5, "Test", "test message", "Ok"); };
         embedded3.Add (testButton);
         embedded2.Add (embedded3);
 

+ 2 - 2
UICatalog/Scenarios/ComboBoxIteration.cs

@@ -60,7 +60,7 @@ public class ComboBoxIteration : Scenario
 
         var btnTwo = new Button { X = Pos.Right (comboBox) + 1, Text = "Two" };
 
-        btnTwo.Accepted += (s, e) =>
+        btnTwo.Accepting += (s, e) =>
                           {
                               items = ["one", "two"];
                               comboBox.SetSource (items);
@@ -71,7 +71,7 @@ public class ComboBoxIteration : Scenario
 
         var btnThree = new Button { X = Pos.Right (comboBox) + 1, Y = Pos.Top (comboBox), Text = "Three" };
 
-        btnThree.Accepted += (s, e) =>
+        btnThree.Accepting += (s, e) =>
                             {
                                 items =["one", "two", "three"];
                                 comboBox.SetSource (items);

+ 4 - 4
UICatalog/Scenarios/ComputedLayout.cs

@@ -363,7 +363,7 @@ public class ComputedLayout : Scenario
         var anchorButton = new Button { Text = "Button using AnchorEnd", Y = Pos.AnchorEnd () };
         anchorButton.X = Pos.AnchorEnd ();
 
-        anchorButton.Accepted += (s, e) =>
+        anchorButton.Accepting += (s, e) =>
                                 {
                                     // This demonstrates how to have a dynamically sized button
                                     // Each time the button is clicked the button's text gets longer
@@ -411,7 +411,7 @@ public class ComputedLayout : Scenario
             Y = Pos.AnchorEnd () - 1
         };
 
-        leftButton.Accepted += (s, e) =>
+        leftButton.Accepting += (s, e) =>
                               {
                                   // This demonstrates how to have a dynamically sized button
                                   // Each time the button is clicked the button's text gets longer
@@ -429,7 +429,7 @@ public class ComputedLayout : Scenario
             Y = Pos.AnchorEnd (2),
         };
 
-        centerButton.Accepted += (s, e) =>
+        centerButton.Accepting += (s, e) =>
                                 {
                                     // This demonstrates how to have a dynamically sized button
                                     // Each time the button is clicked the button's text gets longer
@@ -447,7 +447,7 @@ public class ComputedLayout : Scenario
             Y = Pos.Y (centerButton)
         };
 
-        rightButton.Accepted += (s, e) =>
+        rightButton.Accepting += (s, e) =>
                                {
                                    // This demonstrates how to have a dynamically sized button
                                    // Each time the button is clicked the button's text gets longer

+ 1 - 1
UICatalog/Scenarios/ConfigurationEditor.cs

@@ -70,7 +70,7 @@ public class ConfigurationEditor : Scenario
             Key = Key.F5.WithShift,
             Title = "Reload",
         };
-        reloadShortcut.Accepted += (s, e) => { Reload (); };
+        reloadShortcut.Accepting += (s, e) => { Reload (); };
 
         var saveShortcut = new Shortcut ()
         {

+ 1 - 1
UICatalog/Scenarios/ContentScrolling.cs

@@ -362,7 +362,7 @@ public class ContentScrolling : Scenario
             Height = Dim.Auto (DimAutoStyle.Content, maximumContentDim: Dim.Percent (20)),
         };
 
-        charMap.Accepted += (s, e) =>
+        charMap.Accepting += (s, e) =>
                               MessageBox.Query (20, 7, "Hi", $"Am I a {view.GetType ().Name}?", "Yes", "No");
 
         var buttonAnchored = new Button

+ 2 - 2
UICatalog/Scenarios/CsvEditor.cs

@@ -304,13 +304,13 @@ public class CsvEditor : Scenario
 
         var ok = new Button { Text = "Ok", IsDefault = true };
 
-        ok.Accepted += (s, e) =>
+        ok.Accepting += (s, e) =>
                      {
                          okPressed = true;
                          Application.RequestStop ();
                      };
         var cancel = new Button { Text = "Cancel" };
-        cancel.Accepted += (s, e) => { Application.RequestStop (); };
+        cancel.Accepting += (s, e) => { Application.RequestStop (); };
         var d = new Dialog { Title = title, Buttons = [ok, cancel] };
 
         var lbl = new Label { X = 0, Y = 1, Text = label };

+ 5 - 5
UICatalog/Scenarios/Dialogs.cs

@@ -185,7 +185,7 @@ public class Dialogs : Scenario
             X = Pos.Center (), Y = Pos.Bottom (frame) + 2, IsDefault = true, Text = "_Show Dialog"
         };
 
-        app.Accepted += (s, e) =>
+        app.Accepting += (s, e) =>
                                    {
                                        Dialog dlg = CreateDemoDialog (
                                                                       widthEdit,
@@ -255,7 +255,7 @@ public class Dialogs : Scenario
                     button = new () { Text = NumberToWords.Convert (buttonId), IsDefault = buttonId == 0 };
                 }
 
-                button.Accepted += (s, e) =>
+                button.Accepting += (s, e) =>
                                  {
                                      clicked = buttonId;
                                      Application.RequestStop ();
@@ -290,7 +290,7 @@ public class Dialogs : Scenario
                 Text = "_Add a button"
             };
 
-            add.Accepted += (s, e) =>
+            add.Accepting += (s, e) =>
                           {
                               int buttonId = buttons.Count;
                               Button button;
@@ -308,7 +308,7 @@ public class Dialogs : Scenario
                                   button = new () { Text = NumberToWords.Convert (buttonId), IsDefault = buttonId == 0 };
                               }
 
-                              button.Accepted += (s, e) =>
+                              button.Accepting += (s, e) =>
                                                {
                                                    clicked = buttonId;
                                                    Application.RequestStop ();
@@ -330,7 +330,7 @@ public class Dialogs : Scenario
                 Text = $"A_dd a {char.ConvertFromUtf32 (CODE_POINT)} to each button. This text is really long for a reason."
             };
 
-            addChar.Accepted += (s, e) =>
+            addChar.Accepting += (s, e) =>
                               {
                                   foreach (Button button in buttons)
                                   {

+ 1 - 1
UICatalog/Scenarios/DimAutoDemo.cs

@@ -156,7 +156,7 @@ public class DimAutoDemo : Scenario
             Y = Pos.AnchorEnd ()
         };
 
-        resetButton.Accepted += (s, e) =>
+        resetButton.Accepting += (s, e) =>
         {
             //movingButton.Y = Pos.Bottom (hlabel);
             //movingButton.X = 0;

+ 16 - 16
UICatalog/Scenarios/DynamicMenuBar.cs

@@ -203,7 +203,7 @@ public class DynamicMenuBar : Scenario
             {
                 X = Pos.X (lblShortcut), Y = Pos.Bottom (TextShortcutKey) + 1, Text = "Clear Shortcut"
             };
-            btnShortcut.Accepted += (s, e) => { TextShortcutKey.Text = ""; };
+            btnShortcut.Accepting += (s, e) => { TextShortcutKey.Text = ""; };
             Add (btnShortcut);
 
             CkbIsTopLevel.CheckedStateChanging += (s, e) =>
@@ -393,7 +393,7 @@ public class DynamicMenuBar : Scenario
 
             var btnOk = new Button { IsDefault = true, Text = "Ok" };
 
-            btnOk.Accepted += (s, e) =>
+            btnOk.Accepting += (s, e) =>
                             {
                                 if (string.IsNullOrEmpty (TextTitle.Text))
                                 {
@@ -407,7 +407,7 @@ public class DynamicMenuBar : Scenario
                             };
             var btnCancel = new Button { Text = "Cancel" };
 
-            btnCancel.Accepted += (s, e) =>
+            btnCancel.Accepting += (s, e) =>
                                 {
                                     TextTitle.Text = string.Empty;
                                     Application.RequestStop ();
@@ -666,7 +666,7 @@ public class DynamicMenuBar : Scenario
             };
             Add (frmMenuDetails);
 
-            btnMenuBarUp.Accepted += (s, e) =>
+            btnMenuBarUp.Accepting += (s, e) =>
                                     {
                                         int i = _currentSelectedMenuBar;
 
@@ -688,7 +688,7 @@ public class DynamicMenuBar : Scenario
                                         }
                                     };
 
-            btnMenuBarDown.Accepted += (s, e) =>
+            btnMenuBarDown.Accepting += (s, e) =>
                                       {
                                           int i = _currentSelectedMenuBar;
 
@@ -710,7 +710,7 @@ public class DynamicMenuBar : Scenario
                                           }
                                       };
 
-            btnUp.Accepted += (s, e) =>
+            btnUp.Accepting += (s, e) =>
                              {
                                  int i = _lstMenus.SelectedItem;
                                  MenuItem menuItem = DataContext.Menus.Count > 0 ? DataContext.Menus [i].MenuItem : null;
@@ -732,7 +732,7 @@ public class DynamicMenuBar : Scenario
                                  }
                              };
 
-            btnDown.Accepted += (s, e) =>
+            btnDown.Accepting += (s, e) =>
                                {
                                    int i = _lstMenus.SelectedItem;
                                    MenuItem menuItem = DataContext.Menus.Count > 0 ? DataContext.Menus [i].MenuItem : null;
@@ -754,7 +754,7 @@ public class DynamicMenuBar : Scenario
                                    }
                                };
 
-            btnPreviowsParent.Accepted += (s, e) =>
+            btnPreviowsParent.Accepting += (s, e) =>
                                          {
                                              if (_currentMenuBarItem != null && _currentMenuBarItem.Parent != null)
                                              {
@@ -787,7 +787,7 @@ public class DynamicMenuBar : Scenario
             Add (btnOk);
 
             var btnCancel = new Button { X = Pos.Right (btnOk) + 3, Y = Pos.Top (btnOk), Text = "Cancel" };
-            btnCancel.Accepted += (s, e) => { SetFrameDetails (_currentEditMenuBarItem); };
+            btnCancel.Accepting += (s, e) => { SetFrameDetails (_currentEditMenuBarItem); };
             Add (btnCancel);
 
             txtDelimiter.TextChanging += (s, e) =>
@@ -813,7 +813,7 @@ public class DynamicMenuBar : Scenario
 
             _lstMenus.SelectedItemChanged += (s, e) => { SetFrameDetails (); };
 
-            btnOk.Accepted += (s, e) =>
+            btnOk.Accepting += (s, e) =>
                              {
                                  if (string.IsNullOrEmpty (frmMenuDetails.TextTitle.Text) && _currentEditMenuBarItem != null)
                                  {
@@ -840,7 +840,7 @@ public class DynamicMenuBar : Scenario
                                  }
                              };
 
-            btnAdd.Accepted += (s, e) =>
+            btnAdd.Accepting += (s, e) =>
                               {
                                   if (MenuBar == null)
                                   {
@@ -883,7 +883,7 @@ public class DynamicMenuBar : Scenario
                                   }
                               };
 
-            btnRemove.Accepted += (s, e) =>
+            btnRemove.Accepting += (s, e) =>
                                 {
                                     MenuItem menuItem = (DataContext.Menus.Count > 0 && _lstMenus.SelectedItem > -1
                                                              ? DataContext.Menus [_lstMenus.SelectedItem].MenuItem
@@ -951,7 +951,7 @@ public class DynamicMenuBar : Scenario
                                    SetFrameDetails (menuBarItem);
                                };
 
-            btnNext.Accepted += (s, e) =>
+            btnNext.Accepting += (s, e) =>
                                {
                                    if (_menuBar != null && _currentSelectedMenuBar + 1 < _menuBar.Menus.Length)
                                    {
@@ -961,7 +961,7 @@ public class DynamicMenuBar : Scenario
                                    SelectCurrentMenuBarItem ();
                                };
 
-            btnPrevious.Accepted += (s, e) =>
+            btnPrevious.Accepting += (s, e) =>
                                    {
                                        if (_currentSelectedMenuBar - 1 > -1)
                                        {
@@ -980,7 +980,7 @@ public class DynamicMenuBar : Scenario
                                      }
                                  };
 
-            btnAddMenuBar.Accepted += (s, e) =>
+            btnAddMenuBar.Accepting += (s, e) =>
                                      {
                                          var frameDetails = new DynamicMenuBarDetails (null);
                                          DynamicMenuItem item = frameDetails.EnterMenuItem ();
@@ -1015,7 +1015,7 @@ public class DynamicMenuBar : Scenario
                                          _menuBar.SetNeedsDisplay ();
                                      };
 
-            btnRemoveMenuBar.Accepted += (s, e) =>
+            btnRemoveMenuBar.Accepting += (s, e) =>
                                         {
                                             if (_menuBar == null)
                                             {

+ 11 - 11
UICatalog/Scenarios/DynamicStatusBar.cs

@@ -134,7 +134,7 @@ public class DynamicStatusBar : Scenario
             {
                 X = Pos.X (_lblShortcut), Y = Pos.Bottom (TextShortcut) + 1, Text = "Clear Shortcut"
             };
-            _btnShortcut.Accepted += (s, e) => { TextShortcut.Text = ""; };
+            _btnShortcut.Accepting += (s, e) => { TextShortcut.Text = ""; };
             Add (_btnShortcut);
         }
 
@@ -181,7 +181,7 @@ public class DynamicStatusBar : Scenario
 
             var btnOk = new Button { IsDefault = true, Text = "OK" };
 
-            btnOk.Accepted += (s, e) =>
+            btnOk.Accepting += (s, e) =>
                               {
                                   if (string.IsNullOrEmpty (TextTitle.Text))
                                   {
@@ -196,7 +196,7 @@ public class DynamicStatusBar : Scenario
                               };
             var btnCancel = new Button { Text = "Cancel" };
 
-            btnCancel.Accepted += (s, e) =>
+            btnCancel.Accepting += (s, e) =>
                                   {
                                       TextTitle.Text = string.Empty;
                                       Application.RequestStop ();
@@ -311,7 +311,7 @@ public class DynamicStatusBar : Scenario
             };
             Add (_frmStatusBarDetails);
 
-            _btnUp.Accepted += (s, e) =>
+            _btnUp.Accepting += (s, e) =>
                               {
                                   int i = _lstItems.SelectedItem;
                                   Shortcut statusItem = DataContext.Items.Count > 0 ? DataContext.Items [i].Shortcut : null;
@@ -334,7 +334,7 @@ public class DynamicStatusBar : Scenario
                                   }
                               };
 
-            _btnDown.Accepted += (s, e) =>
+            _btnDown.Accepting += (s, e) =>
                                 {
                                     int i = _lstItems.SelectedItem;
                                     Shortcut statusItem = DataContext.Items.Count > 0 ? DataContext.Items [i].Shortcut : null;
@@ -364,12 +364,12 @@ public class DynamicStatusBar : Scenario
             Add (_btnOk);
 
             var _btnCancel = new Button { X = Pos.Right (_btnOk) + 3, Y = Pos.Top (_btnOk), Text = "Cancel" };
-            _btnCancel.Accepted += (s, e) => { SetFrameDetails (_currentEditStatusItem); };
+            _btnCancel.Accepting += (s, e) => { SetFrameDetails (_currentEditStatusItem); };
             Add (_btnCancel);
 
             _lstItems.SelectedItemChanged += (s, e) => { SetFrameDetails (); };
 
-            _btnOk.Accepted += (s, e) =>
+            _btnOk.Accepting += (s, e) =>
                               {
                                   if (string.IsNullOrEmpty (_frmStatusBarDetails.TextTitle.Text) && _currentEditStatusItem != null)
                                   {
@@ -388,7 +388,7 @@ public class DynamicStatusBar : Scenario
                                   }
                               };
 
-            _btnAdd.Accepted += (s, e) =>
+            _btnAdd.Accepting += (s, e) =>
                                {
                                    if (StatusBar == null)
                                    {
@@ -418,7 +418,7 @@ public class DynamicStatusBar : Scenario
                                    SetFrameDetails ();
                                };
 
-            _btnRemove.Accepted += (s, e) =>
+            _btnRemove.Accepting += (s, e) =>
                                   {
                                       Shortcut statusItem = DataContext.Items.Count > 0
                                                                   ? DataContext.Items [_lstItems.SelectedItem].Shortcut
@@ -448,7 +448,7 @@ public class DynamicStatusBar : Scenario
                                    SetFrameDetails (statusItem);
                                };
 
-            _btnAddStatusBar.Accepted += (s, e) =>
+            _btnAddStatusBar.Accepting += (s, e) =>
                                         {
                                             if (_statusBar != null)
                                             {
@@ -459,7 +459,7 @@ public class DynamicStatusBar : Scenario
                                             Add (_statusBar);
                                         };
 
-            _btnRemoveStatusBar.Accepted += (s, e) =>
+            _btnRemoveStatusBar.Accepting += (s, e) =>
                                            {
                                                if (_statusBar == null)
                                                {

+ 5 - 5
UICatalog/Scenarios/Editor.cs

@@ -872,7 +872,7 @@ public class Editor : Scenario
 
             Text = "Find _Next"
         };
-        btnFindNext.Accepted += (s, e) => FindNext ();
+        btnFindNext.Accepting += (s, e) => FindNext ();
         d.Add (btnFindNext);
 
         var btnFindPrevious = new Button
@@ -882,7 +882,7 @@ public class Editor : Scenario
             Enabled = !string.IsNullOrEmpty (txtToFind.Text),
             Text = "Find _Previous"
         };
-        btnFindPrevious.Accepted += (s, e) => FindPrevious ();
+        btnFindPrevious.Accepting += (s, e) => FindPrevious ();
         d.Add (btnFindPrevious);
 
         txtToFind.TextChanged += (s, e) =>
@@ -1099,7 +1099,7 @@ public class Editor : Scenario
             IsDefault = true,
             Text = "Replace _Next"
         };
-        btnFindNext.Accepted += (s, e) => ReplaceNext ();
+        btnFindNext.Accepting += (s, e) => ReplaceNext ();
         d.Add (btnFindNext);
 
         label = new ()
@@ -1129,7 +1129,7 @@ public class Editor : Scenario
             Enabled = !string.IsNullOrEmpty (txtToFind.Text),
             Text = "Replace _Previous"
         };
-        btnFindPrevious.Accepted += (s, e) => ReplacePrevious ();
+        btnFindPrevious.Accepting += (s, e) => ReplacePrevious ();
         d.Add (btnFindPrevious);
 
         var btnReplaceAll = new Button
@@ -1139,7 +1139,7 @@ public class Editor : Scenario
             Enabled = !string.IsNullOrEmpty (txtToFind.Text),
             Text = "Replace _All"
         };
-        btnReplaceAll.Accepted += (s, e) => ReplaceAll ();
+        btnReplaceAll.Accepting += (s, e) => ReplaceAll ();
         d.Add (btnReplaceAll);
 
         txtToFind.TextChanged += (s, e) =>

+ 1 - 1
UICatalog/Scenarios/FileDialogExamples.cs

@@ -125,7 +125,7 @@ public class FileDialogExamples : Scenario
 
         var btn = new Button { X = 1, Y = 9, IsDefault = true, Text = "Run Dialog" };
 
-        win.Accepted += (s, e) =>
+        win.Accepting += (s, e) =>
                         {
                             try
                             {

+ 1 - 1
UICatalog/Scenarios/GraphViewExample.cs

@@ -185,7 +185,7 @@ public class GraphViewExample : Scenario
                 CanFocus = false
             }
         };
-        statusBar.Add (diagShortcut).Accepted += DiagShortcut_Accept;
+        statusBar.Add (diagShortcut).Accepting += DiagShortcut_Accept;
 
         _graphs [_currentGraph++ % _graphs.Length] ();
 

+ 1 - 1
UICatalog/Scenarios/Images.cs

@@ -55,7 +55,7 @@ public class Images : Scenario
         };
         win.Add (imageView);
 
-        btnOpenImage.Accepted += (_, _) =>
+        btnOpenImage.Accepting += (_, _) =>
                                {
                                    var ofd = new OpenDialog { Title = "Open Image", AllowsMultipleSelection = false };
                                    Application.Run (ofd);

+ 2 - 2
UICatalog/Scenarios/InteractiveTree.cs

@@ -82,13 +82,13 @@ public class InteractiveTree : Scenario
 
         var ok = new Button { Text = "Ok", IsDefault = true };
 
-        ok.Accepted += (s, e) =>
+        ok.Accepting += (s, e) =>
                      {
                          okPressed = true;
                          Application.RequestStop ();
                      };
         var cancel = new Button { Text = "Cancel" };
-        cancel.Accepted += (s, e) => Application.RequestStop ();
+        cancel.Accepting += (s, e) => Application.RequestStop ();
         var d = new Dialog { Title = title, Buttons = [ok, cancel] };
 
         var lbl = new Label { X = 0, Y = 1, Text = label };

+ 1 - 1
UICatalog/Scenarios/InvertColors.cs

@@ -36,7 +36,7 @@ public class InvertColors : Scenario
 
         var button = new Button { X = Pos.Center (), Y = foreColors.Length + 1, Text = "Invert color!" };
 
-        button.Accepted += (s, e) =>
+        button.Accepting += (s, e) =>
                           {
                               foreach (Label label in labels)
                               {

+ 3 - 3
UICatalog/Scenarios/LineDrawing.cs

@@ -147,7 +147,7 @@ public class LineDrawing : Scenario
             IsDefault = true
         };
 
-        btnOk.Accepted += (s, e) =>
+        btnOk.Accepting += (s, e) =>
                         {
                             accept = true;
                             e.Cancel = true;
@@ -162,7 +162,7 @@ public class LineDrawing : Scenario
             Width = Dim.Auto ()
         };
 
-        btnCancel.Accepted += (s, e) =>
+        btnCancel.Accepting += (s, e) =>
                             {
                                 e.Cancel = true;
                                 Application.RequestStop ();
@@ -228,7 +228,7 @@ public class ToolsView : Window
 
         _addLayerBtn = new() { Text = "New Layer", X = Pos.Center (), Y = Pos.Bottom (_stylePicker) };
 
-        _addLayerBtn.Accepted += (s, a) => AddLayer?.Invoke ();
+        _addLayerBtn.Accepting += (s, a) => AddLayer?.Invoke ();
         Add (_colors, _stylePicker, _addLayerBtn);
     }
 

+ 2 - 2
UICatalog/Scenarios/ListColumns.cs

@@ -275,13 +275,13 @@ public class ListColumns : Scenario
         var accepted = false;
         var ok = new Button { Text = "Ok", IsDefault = true };
 
-        ok.Accepted += (s, e) =>
+        ok.Accepting += (s, e) =>
                      {
                          accepted = true;
                          Application.RequestStop ();
                      };
         var cancel = new Button { Text = "Cancel" };
-        cancel.Accepted += (s, e) => { Application.RequestStop (); };
+        cancel.Accepting += (s, e) => { Application.RequestStop (); };
         var d = new Dialog { Title = prompt, Buttons = [ok, cancel] };
 
         var tf = new TextField { Text = getter (_listColView).ToString (), X = 0, Y = 0, Width = Dim.Fill () };

+ 1 - 1
UICatalog/Scenarios/ListViewWithSelection.cs

@@ -139,7 +139,7 @@ public class ListViewWithSelection : Scenario
         _listView.SelectedItemChanged += (s, a) => LogEvent (s as View, a, "SelectedItemChanged");
         _listView.OpenSelectedItem += (s, a) => LogEvent (s as View, a, "OpenSelectedItem");
         _listView.CollectionChanged += (s, a) => LogEvent (s as View, a, "CollectionChanged");
-        _listView.Accepted += (s, a) => LogEvent (s as View, a, "Accept");
+        _listView.Accepting += (s, a) => LogEvent (s as View, a, "Accept");
         _listView.Selecting += (s, a) => LogEvent (s as View, a, "Select");
 
         bool? LogEvent (View sender, EventArgs args, string message)

+ 2 - 2
UICatalog/Scenarios/ListsAndCombos.cs

@@ -147,13 +147,13 @@ public class ListsAndCombos : Scenario
                                 };
 
         var btnMoveUp = new Button { X = 1, Y = Pos.Bottom (lbListView), Text = "Move _Up" };
-        btnMoveUp.Accepted += (s, e) => { listview.MoveUp (); };
+        btnMoveUp.Accepting += (s, e) => { listview.MoveUp (); };
 
         var btnMoveDown = new Button
         {
             X = Pos.Right (btnMoveUp) + 1, Y = Pos.Bottom (lbListView), Text = "Move _Down"
         };
-        btnMoveDown.Accepted += (s, e) => { listview.MoveDown (); };
+        btnMoveDown.Accepting += (s, e) => { listview.MoveDown (); };
 
         win.Add (btnMoveUp, btnMoveDown);
 

+ 3 - 3
UICatalog/Scenarios/Localization.cs

@@ -152,14 +152,14 @@ public class Localization : Scenario
         {
             X = Pos.Right (_allowAnyCheckBox) + 1, Y = Pos.Bottom (textAndFileDialogLabel) + 1, Text = "Open"
         };
-        openDialogButton.Accepted += (sender, e) => ShowFileDialog (false);
+        openDialogButton.Accepting += (sender, e) => ShowFileDialog (false);
         win.Add (openDialogButton);
 
         var saveDialogButton = new Button
         {
             X = Pos.Right (openDialogButton) + 1, Y = Pos.Bottom (textAndFileDialogLabel) + 1, Text = "Save"
         };
-        saveDialogButton.Accepted += (sender, e) => ShowFileDialog (true);
+        saveDialogButton.Accepting += (sender, e) => ShowFileDialog (true);
         win.Add (saveDialogButton);
 
         var wizardLabel = new Label
@@ -173,7 +173,7 @@ public class Localization : Scenario
         win.Add (wizardLabel);
 
         var wizardButton = new Button { X = 2, Y = Pos.Bottom (wizardLabel) + 1, Text = "Open _wizard" };
-        wizardButton.Accepted += (sender, e) => ShowWizard ();
+        wizardButton.Accepting += (sender, e) => ShowWizard ();
         win.Add (wizardButton);
 
         win.Unloaded += (sender, e) => Quit ();

+ 3 - 3
UICatalog/Scenarios/MenuBarScenario.cs

@@ -110,15 +110,15 @@ public class MenuBarScenario : Scenario
         menuBar.LayoutComplete += (s, e) => { _focusedView.Text = appWindow.MostFocused?.ToString () ?? "None"; };
 
         var openBtn = new Button { X = Pos.Center (), Y = 4, Text = "_Open Menu", IsDefault = true };
-        openBtn.Accepted += (s, e) => { menuBar.OpenMenu (); };
+        openBtn.Accepting += (s, e) => { menuBar.OpenMenu (); };
         appWindow.Add (openBtn);
 
         var hideBtn = new Button { X = Pos.Center (), Y = Pos.Bottom (openBtn), Text = "Toggle Menu._Visible" };
-        hideBtn.Accepted += (s, e) => { menuBar.Visible = !menuBar.Visible; };
+        hideBtn.Accepting += (s, e) => { menuBar.Visible = !menuBar.Visible; };
         appWindow.Add (hideBtn);
 
         var enableBtn = new Button { X = Pos.Center (), Y = Pos.Bottom (hideBtn), Text = "_Toggle Menu.Enable" };
-        enableBtn.Accepted += (s, e) => { menuBar.Enabled = !menuBar.Enabled; };
+        enableBtn.Accepting += (s, e) => { menuBar.Enabled = !menuBar.Enabled; };
         appWindow.Add (enableBtn);
 
         appWindow.Add (menuBar);

+ 1 - 1
UICatalog/Scenarios/MessageBoxes.cs

@@ -228,7 +228,7 @@ public class MessageBoxes : Scenario
             X = Pos.Center (), Y = Pos.Bottom (frame) + 2, IsDefault = true, Text = "_Show MessageBox"
         };
 
-        app.Accepted += (s, e) =>
+        app.Accepting += (s, e) =>
                                        {
                                            try
                                            {

+ 1 - 1
UICatalog/Scenarios/Mouse.cs

@@ -241,7 +241,7 @@ public class Mouse : Scenario
         };
         win.Add (label, winLog);
 
-        clearButton.Accepted += (s, e) =>
+        clearButton.Accepting += (s, e) =>
                               {
                                   appLogList.Clear ();
                                   appLog.SetSource (appLogList);

+ 2 - 2
UICatalog/Scenarios/MultiColouredTable.cs

@@ -104,13 +104,13 @@ public class MultiColouredTable : Scenario
 
         var ok = new Button { Text = "Ok", IsDefault = true };
 
-        ok.Accepted += (s, e) =>
+        ok.Accepting += (s, e) =>
                      {
                          okPressed = true;
                          Application.RequestStop ();
                      };
         var cancel = new Button { Text = "Cancel" };
-        cancel.Accepted += (s, e) => { Application.RequestStop (); };
+        cancel.Accepting += (s, e) => { Application.RequestStop (); };
         var d = new Dialog { Title = title, Buttons = [ok, cancel] };
 
         var lbl = new Label { X = 0, Y = 1, Text = label };

+ 3 - 3
UICatalog/Scenarios/NumericUpDownDemo.cs

@@ -114,7 +114,7 @@ internal class NumericUpDownEditor<T> : View where T : notnull
                 Width = 8,
                 Title = "Value",
             };
-            _value.Accepted += ValuedOnAccept;
+            _value.Accepting += ValuedOnAccept;
 
             void ValuedOnAccept (object? sender, EventArgs e)
             {
@@ -169,7 +169,7 @@ internal class NumericUpDownEditor<T> : View where T : notnull
                 Title = "Format",
                 Width = Dim.Width (_value),
             };
-            _format.Accepted += FormatOnAccept;
+            _format.Accepting += FormatOnAccept;
 
             void FormatOnAccept (object? o, EventArgs eventArgs)
             {
@@ -217,7 +217,7 @@ internal class NumericUpDownEditor<T> : View where T : notnull
                 Width = Dim.Width (_value),
             };
 
-            _increment.Accepted += IncrementOnAccept;
+            _increment.Accepting += IncrementOnAccept;
 
             void IncrementOnAccept (object? o, EventArgs eventArgs)
             {

+ 4 - 4
UICatalog/Scenarios/Progress.cs

@@ -142,7 +142,7 @@ public class Progress : Scenario
 
         var startBoth = new Button { X = Pos.Center (), Y = Pos.Bottom (mainLoopTimeoutDemo) + 1, Text = "Start Both" };
 
-        startBoth.Accepted += (s, e) =>
+        startBoth.Accepting += (s, e) =>
                              {
                                  systemTimerDemo.Start ();
                                  mainLoopTimeoutDemo.Start ();
@@ -193,15 +193,15 @@ public class Progress : Scenario
             Add (LeftFrame);
 
             var startButton = new Button { X = Pos.Right (LeftFrame) + 1, Y = 0, Text = "Start Timer" };
-            startButton.Accepted += (s, e) => Start ();
+            startButton.Accepting += (s, e) => Start ();
             var pulseButton = new Button { X = Pos.Right (startButton) + 2, Y = Pos.Y (startButton), Text = "Pulse" };
-            pulseButton.Accepted += (s, e) => Pulse ();
+            pulseButton.Accepting += (s, e) => Pulse ();
 
             var stopbutton = new Button
             {
                 X = Pos.Right (pulseButton) + 2, Y = Pos.Top (pulseButton), Text = "Stop Timer"
             };
-            stopbutton.Accepted += (s, e) => Stop ();
+            stopbutton.Accepting += (s, e) => Stop ();
 
             Add (startButton);
             Add (pulseButton);

+ 3 - 3
UICatalog/Scenarios/ProgressBarStyles.cs

@@ -72,7 +72,7 @@ public class ProgressBarStyles : Scenario
         };
         container.Add (fgColorPickerBtn);
 
-        fgColorPickerBtn.Accepted += (s, e) =>
+        fgColorPickerBtn.Accepting += (s, e) =>
                                     {
                                         if (!LineDrawing.PromptForColor (
                                                                          fgColorPickerBtn.Text,
@@ -102,7 +102,7 @@ public class ProgressBarStyles : Scenario
         };
         container.Add (bgColorPickerBtn);
 
-        bgColorPickerBtn.Accepted += (s, e) =>
+        bgColorPickerBtn.Accepting += (s, e) =>
                                     {
                                         if (!LineDrawing.PromptForColor (
                                                                          fgColorPickerBtn.Text,
@@ -172,7 +172,7 @@ public class ProgressBarStyles : Scenario
         };
         container.Add (continuousPB);
 
-        button.Accepted += (s, e) =>
+        button.Accepting += (s, e) =>
                           {
                               if (_fractionTimer == null)
                               {

+ 1 - 1
UICatalog/Scenarios/RunTExample.cs

@@ -61,7 +61,7 @@ public class RunTExample : Scenario
             };
 
             // When login button is clicked display a message popup
-            btnLogin.Accepted += (s, e) =>
+            btnLogin.Accepting += (s, e) =>
                                {
                                    if (_usernameText.Text == "admin" && passwordText.Text == "password")
                                    {

+ 6 - 6
UICatalog/Scenarios/RuneWidthGreaterThanOne.cs

@@ -106,7 +106,7 @@ public class RuneWidthGreaterThanOne : Scenario
         _label.Text = "Enter your name 你:";
         _text.Text = "gui.cs 你:";
         _button.Text = "Say Hello 你";
-        _button.Accepted += MixedMessage;
+        _button.Accepting += MixedMessage;
         _labelR.X = Pos.AnchorEnd (21);
         _labelR.Y = 18;
         _labelR.Text = "This is a test text 你";
@@ -126,7 +126,7 @@ public class RuneWidthGreaterThanOne : Scenario
         _label.Text = "Enter your name:";
         _text.Text = "gui.cs";
         _button.Text = "Say Hello";
-        _button.Accepted += NarrowMessage;
+        _button.Accepting += NarrowMessage;
         _labelR.X = Pos.AnchorEnd (19);
         _labelR.Y = 18;
         _labelR.Text = "This is a test text";
@@ -143,15 +143,15 @@ public class RuneWidthGreaterThanOne : Scenario
         switch (_lastRunesUsed)
         {
             case "Narrow":
-                _button.Accepted -= NarrowMessage;
+                _button.Accepting -= NarrowMessage;
 
                 break;
             case "Mixed":
-                _button.Accepted -= MixedMessage;
+                _button.Accepting -= MixedMessage;
 
                 break;
             case "Wide":
-                _button.Accepted -= WideMessage;
+                _button.Accepting -= WideMessage;
 
                 break;
         }
@@ -165,7 +165,7 @@ public class RuneWidthGreaterThanOne : Scenario
         _label.Text = "あなたの名前を入力してください:";
         _text.Text = "ティラミス";
         _button.Text = "こんにちはと言う";
-        _button.Accepted += WideMessage;
+        _button.Accepting += WideMessage;
         _labelR.X = Pos.AnchorEnd (29);
         _labelR.Y = 18;
         _labelR.Text = "あなたの名前を入力してください";

+ 3 - 3
UICatalog/Scenarios/Scrolling.cs

@@ -77,7 +77,7 @@ public class Scrolling : Scenario
         scrollView.Add (verticalRuler);
 
         var pressMeButton = new Button { X = 3, Y = 3, Text = "Press me!" };
-        pressMeButton.Accepted += (s, e) => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No");
+        pressMeButton.Accepting += (s, e) => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No");
         scrollView.Add (pressMeButton);
 
         var aLongButton = new Button
@@ -88,7 +88,7 @@ public class Scrolling : Scenario
             Width = Dim.Fill (3),
             Text = "A very long button. Should be wide enough to demo clipping!"
         };
-        aLongButton.Accepted += (s, e) => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No");
+        aLongButton.Accepting += (s, e) => MessageBox.Query (20, 7, "MessageBox", "Neat?", "Yes", "No");
         scrollView.Add (aLongButton);
 
         scrollView.Add (
@@ -130,7 +130,7 @@ public class Scrolling : Scenario
         // TODO: Use Pos.Width instead of (Right-Left) when implemented (#502)
         anchorButton.X = Pos.AnchorEnd (0) - (Pos.Right (anchorButton) - Pos.Left (anchorButton));
 
-        anchorButton.Accepted += (s, e) =>
+        anchorButton.Accepting += (s, e) =>
                                {
                                    // This demonstrates how to have a dynamically sized button
                                    // Each time the button is clicked the button's text gets longer

+ 1 - 1
UICatalog/Scenarios/SendKeys.cs

@@ -100,7 +100,7 @@ public class SendKeys : Scenario
             txtInput.SetFocus ();
         }
 
-        button.Accepted += (s, e) => ProcessInput ();
+        button.Accepting += (s, e) => ProcessInput ();
 
         win.KeyDown += (s, e) =>
                        {

+ 4 - 4
UICatalog/Scenarios/Shortcuts.cs

@@ -151,7 +151,7 @@ public class Shortcuts : Scenario
             KeyBindingScope = KeyBindingScope.HotKey,
         };
         var button = (Button)vShortcut4.CommandView;
-        vShortcut4.Accepted += Button_Clicked;
+        vShortcut4.Accepting += Button_Clicked;
 
         Application.Top.Add (vShortcut4);
 
@@ -348,7 +348,7 @@ public class Shortcuts : Scenario
             HelpText = "App Scope",
             CanFocus = false
         };
-        hShortcut3.Accepted += (o, args) =>
+        hShortcut3.Accepting += (o, args) =>
         {
             Application.RequestStop ();
         };
@@ -380,7 +380,7 @@ public class Shortcuts : Scenario
                     args.Cancel = true;
                 };
 
-                shortcut.Accepted += (o, args) =>
+                shortcut.Accepting += (o, args) =>
                 {
                     eventSource.Add ($"{shortcut!.Id}.Accepting: {shortcut!.CommandView.Text} {shortcut!.CommandView.GetType ().Name}");
                     eventLog.MoveDown ();
@@ -388,7 +388,7 @@ public class Shortcuts : Scenario
                     args.Cancel = true;
                 };
 
-                shortcut.CommandView.Accepted += (o, args) =>
+                shortcut.CommandView.Accepting += (o, args) =>
                 {
                     eventSource.Add ($"{shortcut!.Id}.CommandView.Accepting: {shortcut!.CommandView.Text} {shortcut!.CommandView.GetType ().Name}");
                     eventLog.MoveDown ();

+ 1 - 1
UICatalog/Scenarios/SingleBackgroundWorker.cs

@@ -91,7 +91,7 @@ public class SingleBackgroundWorker : Scenario
 
             var cancel = new Button { Text = "Cancel Worker" };
 
-            cancel.Accepted += (s, e) =>
+            cancel.Accepting += (s, e) =>
                              {
                                  if (_worker == null)
                                  {

+ 1 - 1
UICatalog/Scenarios/Sliders.cs

@@ -595,7 +595,7 @@ public class Sliders : Scenario
 
         foreach (Slider slider in app.Subviews.Where (v => v is Slider)!)
         {
-            slider.Accepted += (o, args) =>
+            slider.Accepting += (o, args) =>
                              {
                                  eventSource.Add ($"Accept: {string.Join(",", slider.GetSetOptions ())}");
                                  eventLog.MoveDown ();

+ 4 - 4
UICatalog/Scenarios/TableEditor.cs

@@ -878,13 +878,13 @@ public class TableEditor : Scenario
 
         var ok = new Button { Text = "Ok", IsDefault = true };
 
-        ok.Accepted += (s, e) =>
+        ok.Accepting += (s, e) =>
                      {
                          okPressed = true;
                          Application.RequestStop ();
                      };
         var cancel = new Button { Text = "Cancel" };
-        cancel.Accepted += (s, e) => { Application.RequestStop (); };
+        cancel.Accepting += (s, e) => { Application.RequestStop (); };
         var d = new Dialog { Title = title, Buttons = [ok, cancel] };
 
         var lbl = new Label { X = 0, Y = 1, Text = _tableView.Table.ColumnNames [e.Col] };
@@ -1076,13 +1076,13 @@ public class TableEditor : Scenario
         var accepted = false;
         var ok = new Button { Text = "Ok", IsDefault = true };
 
-        ok.Accepted += (s, e) =>
+        ok.Accepting += (s, e) =>
                      {
                          accepted = true;
                          Application.RequestStop ();
                      };
         var cancel = new Button { Text = "Cancel" };
-        cancel.Accepted += (s, e) => { Application.RequestStop (); };
+        cancel.Accepting += (s, e) => { Application.RequestStop (); };
         var d = new Dialog
         {
             Title = prompt,

+ 1 - 1
UICatalog/Scenarios/Text.cs

@@ -442,7 +442,7 @@ public class Text : Scenario
 
         win.Add (acceptView);
 
-        win.Accepted += WinOnAccept;
+        win.Accepting += WinOnAccept;
 
         Application.Run (win);
         win.Dispose ();

+ 8 - 8
UICatalog/Scenarios/Threading.cs

@@ -56,7 +56,7 @@ public class Threading : Scenario
                 };
 
         _btnActionCancel = new Button { X = 1, Y = 1, Text = "Cancelable Load Items" };
-        _btnActionCancel.Accepted += (s, e) => Application.Invoke (CallLoadItemsAsync);
+        _btnActionCancel.Accepting += (s, e) => Application.Invoke (CallLoadItemsAsync);
 
         win.Add (new Label { X = Pos.X (_btnActionCancel), Y = Pos.Y (_btnActionCancel) + 4, Text = "Data Items:" });
 
@@ -84,24 +84,24 @@ public class Threading : Scenario
         var text = new TextField { X = 1, Y = 3, Width = 100, Text = "Type anything after press the button" };
 
         var btnAction = new Button { X = 80, Y = 10, Text = "Load Data Action" };
-        btnAction.Accepted += (s, e) => _action.Invoke ();
+        btnAction.Accepting += (s, e) => _action.Invoke ();
         var btnLambda = new Button { X = 80, Y = 12, Text = "Load Data Lambda" };
-        btnLambda.Accepted += (s, e) => _lambda.Invoke ();
+        btnLambda.Accepting += (s, e) => _lambda.Invoke ();
         var btnHandler = new Button { X = 80, Y = 14, Text = "Load Data Handler" };
-        btnHandler.Accepted += (s, e) => _handler.Invoke (null, EventArgs.Empty);
+        btnHandler.Accepting += (s, e) => _handler.Invoke (null, EventArgs.Empty);
         var btnSync = new Button { X = 80, Y = 16, Text = "Load Data Synchronous" };
-        btnSync.Accepted += (s, e) => _sync.Invoke ();
+        btnSync.Accepting += (s, e) => _sync.Invoke ();
         var btnMethod = new Button { X = 80, Y = 18, Text = "Load Data Method" };
-        btnMethod.Accepted += async (s, e) => await MethodAsync ();
+        btnMethod.Accepting += async (s, e) => await MethodAsync ();
         var btnClearData = new Button { X = 80, Y = 20, Text = "Clear Data" };
 
-        btnClearData.Accepted += (s, e) =>
+        btnClearData.Accepting += (s, e) =>
                                 {
                                     _itemsList.Source = null;
                                     LogJob ("Cleaning Data");
                                 };
         var btnQuit = new Button { X = 80, Y = 22, Text = "Quit" };
-        btnQuit.Accepted += (s, e) => Application.RequestStop ();
+        btnQuit.Accepting += (s, e) => Application.RequestStop ();
 
         win.Add (
                  _itemsList,

+ 1 - 1
UICatalog/Scenarios/TimeAndDate.cs

@@ -126,7 +126,7 @@ public class TimeAndDate : Scenario
             X = Pos.Center (), Y = Pos.Bottom (win) - 5, Text = "Swap Long/Short & Read/Read Only"
         };
 
-        swapButton.Accepted += (s, e) =>
+        swapButton.Accepting += (s, e) =>
                              {
                                  longTime.ReadOnly = !longTime.ReadOnly;
                                  shortTime.ReadOnly = !shortTime.ReadOnly;

+ 2 - 2
UICatalog/Scenarios/VkeyPacketSimulator.cs

@@ -244,7 +244,7 @@ public class VkeyPacketSimulator : Scenario
                              }
                          };
 
-        btnInput.Accepted += (s, e) =>
+        btnInput.Accepting += (s, e) =>
                            {
                                if (!tvInput.HasFocus && _keyboardStrokes.Count == 0)
                                {
@@ -252,7 +252,7 @@ public class VkeyPacketSimulator : Scenario
                                }
                            };
 
-        btnOutput.Accepted += (s, e) =>
+        btnOutput.Accepting += (s, e) =>
                             {
                                 if (!tvOutput.HasFocus && _keyboardStrokes.Count == 0)
                                 {

+ 2 - 2
UICatalog/Scenarios/WindowsAndFrameViews.cs

@@ -52,7 +52,7 @@ public class WindowsAndFrameViews : Scenario
             ColorScheme = Colors.ColorSchemes ["Error"],
             Text = $"Padding of container is {padding}"
         };
-        paddingButton.Accepted += (s, e) => About ();
+        paddingButton.Accepting += (s, e) => About ();
         win.Add (paddingButton);
 
         win.Add (
@@ -97,7 +97,7 @@ public class WindowsAndFrameViews : Scenario
                 X = Pos.Center (), Y = 0, ColorScheme = Colors.ColorSchemes ["Error"], Text = "Press me! (Y = 0)"
             };
 
-            pressMeButton.Accepted += (s, e) =>
+            pressMeButton.Accepting += (s, e) =>
                                         MessageBox.ErrorQuery (loopWin.Title, "Neat?", "Yes", "No");
             loopWin.Add (pressMeButton);
 

+ 1 - 1
UICatalog/Scenarios/WizardAsView.cs

@@ -122,7 +122,7 @@ public class WizardAsView : Scenario
             Text = "Press Me to Rename Step", X = Pos.Right (buttonLbl), Y = Pos.Top (buttonLbl)
         };
 
-        button.Accepted += (s, e) =>
+        button.Accepting += (s, e) =>
                           {
                               secondStep.Title = "2nd Step";
 

+ 3 - 3
UICatalog/Scenarios/Wizards.cs

@@ -109,7 +109,7 @@ public class Wizards : Scenario
             X = Pos.Center (), Y = Pos.Bottom (frame) + 2, IsDefault = true, Text = "_Show Wizard"
         };
 
-        showWizardButton.Accepted += (s, e) =>
+        showWizardButton.Accepting += (s, e) =>
                                    {
                                        try
                                        {
@@ -193,7 +193,7 @@ public class Wizards : Scenario
                                            };
                                            secondStep.Add (radioGroup2);
 
-                                           button.Accepted += (s, e) =>
+                                           button.Accepting += (s, e) =>
                                                             {
                                                                 secondStep.Title = "2nd Step";
 
@@ -299,7 +299,7 @@ public class Wizards : Scenario
                                                Y = Pos.AnchorEnd ()
                                            };
 
-                                           hideHelpBtn.Accepted += (s, e) =>
+                                           hideHelpBtn.Accepting += (s, e) =>
                                                                  {
                                                                      if (fourthStep.HelpText.Length > 0)
                                                                      {

+ 1 - 1
UICatalog/UICatalog.cs

@@ -515,7 +515,7 @@ public class UICatalogApp
                     Title = "Show/Hide Status Bar",
                     CanFocus = false,
                 };
-                statusBarShortcut.Accepted += (sender, args) =>
+                statusBarShortcut.Accepting += (sender, args) =>
                                             {
                                                 StatusBar.Visible = !StatusBar.Visible;
                                                 args.Cancel = true;

+ 3 - 3
UnitTests/Application/MainLoopTests.cs

@@ -682,7 +682,7 @@ public class MainLoopTests
 
         var btnLaunch = new Button { Text = "Open Window" };
 
-        btnLaunch.Accepted += (s, e) => action ();
+        btnLaunch.Accepting += (s, e) => action ();
 
         var top = new Toplevel ();
         top.Add (btnLaunch);
@@ -918,11 +918,11 @@ public class MainLoopTests
 
         btn = new Button { Text = "Click Me" };
 
-        btn.Accepted += RunAsyncTest;
+        btn.Accepting += RunAsyncTest;
 
         var totalbtn = new Button { X = Pos.Right (btn), Text = "total" };
 
-        totalbtn.Accepted += (s, e) => { MessageBox.Query ("Count", $"Count is {total}", "Ok"); };
+        totalbtn.Accepting += (s, e) => { MessageBox.Query ("Count", $"Count is {total}", "Ok"); };
 
         startWindow.Add (btn);
         startWindow.Add (totalbtn);

+ 4 - 4
UnitTests/Dialogs/DialogTests.cs

@@ -1058,18 +1058,18 @@ public class DialogTests
         Button btn3 = null;
         string expected = null;
 
-        btn1.Accepted += (s, e) =>
+        btn1.Accepting += (s, e) =>
                        {
                            btn2 = new () { Text = "Show Sub" };
                            btn3 = new () { Text = "Close" };
-                           btn3.Accepted += (s, e) => RequestStop ();
+                           btn3.Accepting += (s, e) => RequestStop ();
 
-                           btn2.Accepted += (s, e) =>
+                           btn2.Accepting += (s, e) =>
                                           {
                                               // Don't test MessageBox in Dialog unit tests!
                                               var subBtn = new Button { Text = "Ok", IsDefault = true };
                                               var subDlg = new Dialog { Text = "ya", Width = 20, Height = 5, Buttons = [subBtn] };
-                                              subBtn.Accepted += (s, e) => RequestStop (subDlg);
+                                              subBtn.Accepting += (s, e) => RequestStop (subDlg);
                                               Run (subDlg);
                                           };
 

+ 2 - 2
UnitTests/Dialogs/MessageBoxTests.cs

@@ -37,7 +37,7 @@ public class MessageBoxTests
 
                                              Button btn = Application.Navigation!.GetFocused () as Button;
 
-                                             btn.Accepted += (sender, e) => { btnAcceptCount++; };
+                                             btn.Accepting += (sender, e) => { btnAcceptCount++; };
 
                                              // Click
                                              Application.OnKeyDown (Key.Enter);
@@ -120,7 +120,7 @@ public class MessageBoxTests
 
                                              Button btn = Application.Navigation!.GetFocused () as Button;
 
-                                             btn.Accepted += (sender, e) => { btnAcceptCount++; };
+                                             btn.Accepting += (sender, e) => { btnAcceptCount++; };
 
                                              Application.OnKeyDown (Key.Space);
 

+ 1 - 1
UnitTests/View/HotKeyTests.cs

@@ -358,7 +358,7 @@ public class HotKeyTests
         };
         Application.Top.Add (view);
         view.HandlingHotKey += (s, e) => hotKeyRaised = true;
-        view.Accepted += (s, e) => acceptRaised = true;
+        view.Accepting += (s, e) => acceptRaised = true;
         view.Selecting += (s, e) => selectRaised = true;
 
         Assert.Equal (KeyCode.T, view.HotKey);

+ 1 - 1
UnitTests/View/Navigation/EnabledTests.cs

@@ -258,7 +258,7 @@ public class EnabledTests () : TestsAllViews
         var wasClicked = false;
         var button = new Button { Text = "Click Me" };
         button.IsDefault = true;
-        button.Accepted += (s, e) => wasClicked = !wasClicked;
+        button.Accepting += (s, e) => wasClicked = !wasClicked;
         var win = new Window { Width = Dim.Fill (), Height = Dim.Fill () };
         win.Add (button);
         var top = new Toplevel ();

+ 1 - 1
UnitTests/View/Navigation/HasFocusTests.cs

@@ -80,7 +80,7 @@ public class HasFocusTests () : TestsAllViews
     {
         var wasClicked = false;
         var view = new Button { Text = "Click Me" };
-        view.Accepted += (s, e) => wasClicked = !wasClicked;
+        view.Accepting += (s, e) => wasClicked = !wasClicked;
 
         view.NewKeyDownEvent (Key.Space);
         Assert.True (wasClicked);

+ 4 - 4
UnitTests/View/ViewCommandTests.cs

@@ -42,7 +42,7 @@ public class ViewCommandTests (ITestOutputHelper output)
         var view = new View ();
         var acceptInvoked = false;
 
-        view.Accepted += ViewOnAccept;
+        view.Accepting += ViewOnAccept;
 
         bool? ret = view.InvokeCommand (Command.Accept);
         Assert.True (ret);
@@ -63,7 +63,7 @@ public class ViewCommandTests (ITestOutputHelper output)
         var view = new View ();
         var accepted = false;
 
-        view.Accepted += ViewOnAccept;
+        view.Accepting += ViewOnAccept;
 
         view.InvokeCommand (Command.Accept);
         Assert.True (accepted);
@@ -235,7 +235,7 @@ public class ViewCommandTests (ITestOutputHelper output)
         {
             CanFocus = true;
 
-            Accepted += (s, a) =>
+            Accepting += (s, a) =>
                       {
                           a.Cancel = HandleAccepted;
                           AcceptedCount++;
@@ -260,7 +260,7 @@ public class ViewCommandTests (ITestOutputHelper output)
         public bool HandleOnAccepted { get; set; }
 
         /// <inheritdoc />
-        protected override bool OnAccepted (CommandEventArgs args)
+        protected override bool OnAccepting (CommandEventArgs args)
         {
             OnAcceptedCount++;
 

+ 3 - 3
UnitTests/Views/AllViewsTests.cs

@@ -117,7 +117,7 @@ public class AllViewsTests (ITestOutputHelper output) : TestsAllViews
         view.Selecting += (s, e) => selectingCount++;
 
         var acceptedCount = 0;
-        view.Accepted += (s, e) =>
+        view.Accepting += (s, e) =>
                          {
                              acceptedCount++;
                          };
@@ -152,7 +152,7 @@ public class AllViewsTests (ITestOutputHelper output) : TestsAllViews
         view.Selecting += (s, e) => selectingCount++;
 
         var acceptedCount = 0;
-        view.Accepted += (s, e) =>
+        view.Accepting += (s, e) =>
                          {
                              acceptedCount++;
                          };
@@ -192,7 +192,7 @@ public class AllViewsTests (ITestOutputHelper output) : TestsAllViews
         view.Selecting += (s, e) => selectingCount++;
 
         var acceptedCount = 0;
-        view.Accepted += (s, e) =>
+        view.Accepting += (s, e) =>
                          {
                              acceptedCount++;
                          };

+ 10 - 10
UnitTests/Views/ButtonTests.cs

@@ -249,7 +249,7 @@ public class ButtonTests (ITestOutputHelper output)
     {
         var clicked = false;
         var btn = new Button { Text = "_Test" };
-        btn.Accepted += (s, e) => clicked = true;
+        btn.Accepting += (s, e) => clicked = true;
 
         Assert.Equal (KeyCode.T, btn.HotKey);
         Assert.False (btn.NewKeyDownEvent (Key.T)); // Button processes, but does not handle
@@ -280,7 +280,7 @@ public class ButtonTests (ITestOutputHelper output)
         button.CanFocus = focused;
 
         int acceptInvoked = 0;
-        button.Accepted += (s, e) => acceptInvoked++;
+        button.Accepting += (s, e) => acceptInvoked++;
 
         superView.Add (button);
         button.SetFocus ();
@@ -308,7 +308,7 @@ public class ButtonTests (ITestOutputHelper output)
         button.CanFocus = focused;
 
         int acceptInvoked = 0;
-        button.Accepted += (s, e) => acceptInvoked++;
+        button.Accepting += (s, e) => acceptInvoked++;
 
         superView.Add (button);
         button.SetFocus ();
@@ -339,7 +339,7 @@ public class ButtonTests (ITestOutputHelper output)
         button.CanFocus = focused;
 
         int acceptInvoked = 0;
-        button.Accepted += (s, e) => acceptInvoked++;
+        button.Accepting += (s, e) => acceptInvoked++;
 
         superView.Add (button);
         button.SetFocus ();
@@ -363,7 +363,7 @@ public class ButtonTests (ITestOutputHelper output)
         var pressed = 0;
         var btn = new Button { Text = "Press Me" };
 
-        btn.Accepted += (s, e) => pressed++;
+        btn.Accepting += (s, e) => pressed++;
 
         // The Button class supports the Default and Accept command
         Assert.Contains (Command.HotKey, btn.GetSupportedCommands ());
@@ -414,7 +414,7 @@ public class ButtonTests (ITestOutputHelper output)
     {
         var clicked = false;
         var btn = new Button { Text = "_Test" };
-        btn.Accepted += (s, e) => clicked = true;
+        btn.Accepting += (s, e) => clicked = true;
         var top = new Toplevel ();
         top.Add (btn);
         Application.Begin (top);
@@ -483,7 +483,7 @@ public class ButtonTests (ITestOutputHelper output)
         var button = new Button ();
         var accepted = false;
 
-        button.Accepted += ButtonOnAccept;
+        button.Accepting += ButtonOnAccept;
         button.InvokeCommand (Command.HotKey);
 
         Assert.True (accepted);
@@ -500,7 +500,7 @@ public class ButtonTests (ITestOutputHelper output)
         var button = new Button ();
         var acceptInvoked = false;
 
-        button.Accepted += ButtonAccept;
+        button.Accepting += ButtonAccept;
 
         bool? ret = button.InvokeCommand (Command.Accept);
         Assert.True (ret);
@@ -612,7 +612,7 @@ public class ButtonTests (ITestOutputHelper output)
 
         button.Selecting += (s, e) => selectingCount++;
         var acceptedCount = 0;
-        button.Accepted += (s, e) =>
+        button.Accepting += (s, e) =>
                            {
                                acceptedCount++;
                                e.Cancel = true;
@@ -657,7 +657,7 @@ public class ButtonTests (ITestOutputHelper output)
 
         var acceptedCount = 0;
 
-        button.Accepted += (s, e) =>
+        button.Accepting += (s, e) =>
                            {
                                acceptedCount++;
                                e.Cancel = true;

+ 5 - 5
UnitTests/Views/CheckBoxTests.cs

@@ -184,7 +184,7 @@ public class CheckBoxTests (ITestOutputHelper output)
         ckb.Selecting += (s, e) => selectCount++;
 
         int acceptCount = 0;
-        ckb.Accepted += (s, e) => acceptCount++;
+        ckb.Accepting += (s, e) => acceptCount++;
 
         Assert.Equal (CheckState.UnChecked, ckb.CheckedState);
         Assert.Equal (0, checkedStateChangingCount);
@@ -228,7 +228,7 @@ public class CheckBoxTests (ITestOutputHelper output)
         var ckb = new CheckBox ();
         var acceptInvoked = false;
 
-        ckb.Accepted += ViewOnAccept;
+        ckb.Accepting += ViewOnAccept;
 
         bool? ret = ckb.InvokeCommand (Command.Accept);
         Assert.True (ret);
@@ -259,7 +259,7 @@ public class CheckBoxTests (ITestOutputHelper output)
         checkBox.Selecting += (s, e) => selectCount++;
 
         int acceptCount = 0;
-        checkBox.Accepted += (s, e) => acceptCount++;
+        checkBox.Accepting += (s, e) => acceptCount++;
 
         checkBox.HasFocus = true;
         Assert.True (checkBox.HasFocus);
@@ -303,7 +303,7 @@ public class CheckBoxTests (ITestOutputHelper output)
         checkBox.Selecting += (s, e) => selectCount++;
 
         int acceptCount = 0;
-        checkBox.Accepted += (s, e) => acceptCount++;
+        checkBox.Accepting += (s, e) => acceptCount++;
 
         checkBox.HasFocus = true;
         Assert.True (checkBox.HasFocus);
@@ -544,7 +544,7 @@ public class CheckBoxTests (ITestOutputHelper output)
         var cb = new CheckBox ();
         var accepted = false;
 
-        cb.Accepted += CheckBoxOnAccept;
+        cb.Accepting += CheckBoxOnAccept;
         cb.InvokeCommand (Command.HotKey);
 
         Assert.False (accepted);

+ 1 - 1
UnitTests/Views/LabelTests.cs

@@ -74,7 +74,7 @@ public class LabelTests (ITestOutputHelper output)
         var label = new Label ();
         var accepted = false;
 
-        label.Accepted += LabelOnAccept;
+        label.Accepting += LabelOnAccept;
         label.InvokeCommand (Command.HotKey);
 
         Assert.False (accepted);

+ 3 - 3
UnitTests/Views/ListViewTests.cs

@@ -414,7 +414,7 @@ Item 6",
         var listView = new ListView ();
         var accepted = false;
 
-        listView.Accepted += OnAccepted;
+        listView.Accepting += OnAccepted;
         listView.InvokeCommand (Command.HotKey);
 
         Assert.False (accepted);
@@ -435,7 +435,7 @@ Item 6",
         var opened = false;
         var selectedValue = string.Empty;
 
-        listView.Accepted += Accepted;
+        listView.Accepting += Accepted;
         listView.OpenSelectedItem += OpenSelectedItem;
 
         listView.InvokeCommand (Command.Accept);
@@ -466,7 +466,7 @@ Item 6",
         var opened = false;
         var selectedValue = string.Empty;
 
-        listView.Accepted += Accepted;
+        listView.Accepting += Accepted;
         listView.OpenSelectedItem += OpenSelectedItem;
 
         listView.InvokeCommand (Command.Accept);

+ 1 - 1
UnitTests/Views/MenuBarTests.cs

@@ -238,7 +238,7 @@ public class MenuBarTests (ITestOutputHelper output)
 
         var btnClicked = false;
         var btn = new Button { Y = 4, Text = "Test" };
-        btn.Accepted += (s, e) => btnClicked = true;
+        btn.Accepting += (s, e) => btnClicked = true;
         var top = new Toplevel ();
         top.Add (menu, btn);
         Application.Begin (top);

+ 8 - 8
UnitTests/Views/RadioGroupTests.cs

@@ -94,7 +94,7 @@ public class RadioGroupTests (ITestOutputHelper output)
         rg.Selecting += (s, e) => selectingCount++;
 
         var acceptedCount = 0;
-        rg.Accepted += (s, e) => acceptedCount++;
+        rg.Accepting += (s, e) => acceptedCount++;
 
         // By default the first item is selected
         Assert.Equal (0, rg.SelectedItem);
@@ -223,7 +223,7 @@ public class RadioGroupTests (ITestOutputHelper output)
         rg.Selecting += (s, e) => selectCount++;
 
         var acceptCount = 0;
-        rg.Accepted += (s, e) => acceptCount++;
+        rg.Accepting += (s, e) => acceptCount++;
 
         // By default the first item is selected
         Assert.Equal (0, rg.SelectedItem);
@@ -300,7 +300,7 @@ public class RadioGroupTests (ITestOutputHelper output)
         rg.Selecting += (s, e) => selectCount++;
 
         var acceptCount = 0;
-        rg.Accepted += (s, e) => acceptCount++;
+        rg.Accepting += (s, e) => acceptCount++;
 
         // By default the first item is selected
         Assert.Equal (0, rg.SelectedItem);
@@ -491,7 +491,7 @@ public class RadioGroupTests (ITestOutputHelper output)
         var group = new RadioGroup { RadioLabels = new [] { "_Left", "_Right", "Cen_tered", "_Justified" } };
         var accepted = false;
 
-        group.Accepted += OnAccept;
+        group.Accepting += OnAccept;
         group.InvokeCommand (Command.HotKey);
 
         Assert.False (accepted);
@@ -507,7 +507,7 @@ public class RadioGroupTests (ITestOutputHelper output)
         var group = new RadioGroup { RadioLabels = new [] { "_Left", "_Right", "Cen_tered", "_Justified" } };
         var accepted = false;
 
-        group.Accepted += OnAccept;
+        group.Accepting += OnAccept;
         group.InvokeCommand (Command.Accept);
 
         Assert.True (accepted);
@@ -629,7 +629,7 @@ public class RadioGroupTests (ITestOutputHelper output)
         radioGroup.Selecting += (s, e) => selectingCount++;
 
         var acceptedCount = 0;
-        radioGroup.Accepted += (s, e) => acceptedCount++;
+        radioGroup.Accepting += (s, e) => acceptedCount++;
 
         Assert.Equal (Orientation.Vertical, radioGroup.Orientation);
 
@@ -681,7 +681,7 @@ public class RadioGroupTests (ITestOutputHelper output)
         var acceptedCount = 0;
         var handleAccepted = false;
 
-        radioGroup.Accepted += (s, e) =>
+        radioGroup.Accepting += (s, e) =>
                              {
                                  acceptedCount++;
                                  e.Cancel = handleAccepted;
@@ -733,7 +733,7 @@ public class RadioGroupTests (ITestOutputHelper output)
 
         var superViewAcceptCount = 0;
 
-        superView.Accepted += (s, a) =>
+        superView.Accepting += (s, a) =>
                             {
                                 superViewAcceptCount++;
                                 a.Cancel = true;

+ 1 - 1
UnitTests/Views/ScrollBarViewTests.cs

@@ -1154,7 +1154,7 @@ This is a test
         var text = "This is a test\nThis is a test\nThis is a test\nThis is a test\nThis is a test";
         var label = new Label { Width = 14, Height = 5, Text = text };
         var btn = new Button { X = 14, Text = "Click Me!" };
-        btn.Accepted += (s, e) => clicked = true;
+        btn.Accepting += (s, e) => clicked = true;
         var top = new Toplevel ();
         top.Add (label, btn);
 

+ 10 - 10
UnitTests/Views/ShortcutTests.cs

@@ -422,7 +422,7 @@ public class ShortcutTests
         Application.Top.LayoutSubviews ();
 
         var accepted = 0;
-        shortcut.Accepted += (s, e) => accepted++;
+        shortcut.Accepting += (s, e) => accepted++;
 
         Application.OnMouseEvent (
                                   new ()
@@ -471,12 +471,12 @@ public class ShortcutTests
         };
 
         var commandViewAcceptCount = 0;
-        shortcut.CommandView.Accepted += (s, e) => { commandViewAcceptCount++; };
+        shortcut.CommandView.Accepting += (s, e) => { commandViewAcceptCount++; };
         var commandViewSelectCount = 0;
         shortcut.CommandView.Selecting += (s, e) => { commandViewSelectCount++; };
 
         var shortcutAcceptCount = 0;
-        shortcut.Accepted += (s, e) => { shortcutAcceptCount++; };
+        shortcut.Accepting += (s, e) => { shortcutAcceptCount++; };
         var shortcutSelectCount = 0;
         shortcut.Selecting += (s, e) => { shortcutSelectCount++; };
 
@@ -533,13 +533,13 @@ public class ShortcutTests
             CanFocus = false
         };
         var buttonAccepted = 0;
-        shortcut.CommandView.Accepted += (s, e) => { buttonAccepted++; };
+        shortcut.CommandView.Accepting += (s, e) => { buttonAccepted++; };
         Application.Top.Add (shortcut);
         Application.Top.SetRelativeLayout (new (100, 100));
         Application.Top.LayoutSubviews ();
 
         var accepted = 0;
-        shortcut.Accepted += (s, e) => { accepted++; };
+        shortcut.Accepting += (s, e) => { accepted++; };
 
         Application.OnMouseEvent (
                                   new ()
@@ -587,7 +587,7 @@ public class ShortcutTests
             CanFocus = false
         };
         var checkboxAccepted = 0;
-        shortcut.CommandView.Accepted += (s, e) => { checkboxAccepted++; };
+        shortcut.CommandView.Accepting += (s, e) => { checkboxAccepted++; };
 
         var checkboxSelected = 0;
         shortcut.CommandView.Selecting += (s, e) =>
@@ -610,7 +610,7 @@ public class ShortcutTests
         };
 
         var accepted = 0;
-        shortcut.Accepted += (s, e) =>
+        shortcut.Accepting += (s, e) =>
                              {
                                  accepted++;
                                  e.Cancel = true;
@@ -662,7 +662,7 @@ public class ShortcutTests
         Assert.Equal (canFocus, shortcut.HasFocus);
 
         var accepted = 0;
-        shortcut.Accepted += (s, e) => accepted++;
+        shortcut.Accepting += (s, e) => accepted++;
 
         var selected = 0;
         shortcut.Selecting += (s, e) => selected++;
@@ -710,7 +710,7 @@ public class ShortcutTests
         Assert.Equal (canFocus, shortcut.HasFocus);
 
         var accepted = 0;
-        shortcut.Accepted += (s, e) =>
+        shortcut.Accepting += (s, e) =>
                              {
                                  accepted++;
                                  e.Cancel = true;
@@ -749,7 +749,7 @@ public class ShortcutTests
         Application.Top.SetFocus ();
 
         var accepted = 0;
-        shortcut.Accepted += (s, e) => accepted++;
+        shortcut.Accepting += (s, e) => accepted++;
 
         Application.OnKeyDown (key);
 

+ 8 - 8
UnitTests/Views/TextFieldTests.cs

@@ -555,7 +555,7 @@ public class TextFieldTests (ITestOutputHelper output)
         TextField tf = new ();
 
         var acceptedCount = 0;
-        tf.Accepted += (sender, args) => acceptedCount++;
+        tf.Accepting += (sender, args) => acceptedCount++;
 
         Application.Top = new ();
         Application.Top.Add (tf);
@@ -818,7 +818,7 @@ public class TextFieldTests (ITestOutputHelper output)
     {
         var view = new TextField ();
         var accepted = false;
-        view.Accepted += OnAccept;
+        view.Accepting += OnAccept;
         view.InvokeCommand (Command.HotKey);
 
         Assert.False (accepted);
@@ -834,7 +834,7 @@ public class TextFieldTests (ITestOutputHelper output)
         var view = new TextField ();
 
         var accepted = false;
-        view.Accepted += Accept;
+        view.Accepting += Accept;
         view.InvokeCommand (Command.Accept);
         Assert.True (accepted);
 
@@ -867,10 +867,10 @@ public class TextFieldTests (ITestOutputHelper output)
         superView.Add (tf, button);
 
         var buttonAccept = 0;
-        button.Accepted += ButtonAccept;
+        button.Accepting += ButtonAccept;
 
         var textFieldAccept = 0;
-        tf.Accepted += TextFieldAccept;
+        tf.Accepting += TextFieldAccept;
 
         tf.SetFocus ();
         Assert.True (tf.HasFocus);
@@ -917,7 +917,7 @@ public class TextFieldTests (ITestOutputHelper output)
         superView.Add (tf, button);
 
         var buttonAccept = 0;
-        button.Accepted += ButtonAccept;
+        button.Accepting += ButtonAccept;
 
         tf.SetFocus ();
         Assert.True (tf.HasFocus);
@@ -946,13 +946,13 @@ public class TextFieldTests (ITestOutputHelper output)
 
         var tfAcceptedInvoked = false;
         var handle = false;
-        view.Accepted += TextViewAccept;
+        view.Accepting += TextViewAccept;
         Assert.False (view.InvokeCommand (Command.Accept));
         Assert.True (tfAcceptedInvoked);
 
         tfAcceptedInvoked = false;
         handle = true;
-        view.Accepted += TextViewAccept;
+        view.Accepting += TextViewAccept;
         Assert.True (view.InvokeCommand (Command.Accept));
         Assert.True (tfAcceptedInvoked);
 

+ 7 - 7
UnitTests/Views/TextViewTests.cs

@@ -8464,7 +8464,7 @@ line.
     {
         var view = new TextView ();
         var accepted = false;
-        view.Accepted += OnAccept;
+        view.Accepting += OnAccept;
         view.InvokeCommand (Command.HotKey);
 
         Assert.False (accepted);
@@ -8485,7 +8485,7 @@ line.
         };
 
         int acceptedEvents = 0;
-        view.Accepted += Accept;
+        view.Accepting += Accept;
         view.InvokeCommand (Command.Accept);
         Assert.Equal (expectedAcceptEvents, acceptedEvents);
 
@@ -8505,7 +8505,7 @@ line.
         };
 
         int accepted = 0;
-        view.Accepted += Accept;
+        view.Accepting += Accept;
         view.NewKeyDownEvent (Key.Enter);
         Assert.Equal (expectedAccepts, accepted);
 
@@ -8525,7 +8525,7 @@ line.
         };
 
         int accepted = 0;
-        view.Accepted += Accept;
+        view.Accepting += Accept;
         view.NewKeyDownEvent (Key.Enter);
         Assert.Equal (expectedAccepts, accepted);
 
@@ -8554,10 +8554,10 @@ line.
         superView.Add (tv, button);
 
         var buttonAccept = 0;
-        button.Accepted += ButtonAccept;
+        button.Accepting += ButtonAccept;
 
         var textViewAccept = 0;
-        tv.Accepted += TextViewAccept;
+        tv.Accepting += TextViewAccept;
 
         tv.SetFocus ();
         Assert.True (tv.HasFocus);
@@ -8603,7 +8603,7 @@ line.
         superView.Add (tv, button);
 
         var buttonAccept = 0;
-        button.Accepted += ButtonAccept;
+        button.Accepting += ButtonAccept;
 
         tv.SetFocus ();
         Assert.True (tv.HasFocus);

+ 1 - 1
UnitTests/Views/ToplevelTests.cs

@@ -947,7 +947,7 @@ public partial class ToplevelTests (ITestOutputHelper output)
         var testWindow = new Window { X = 2, Y = 1, Width = 15, Height = 10 };
         testWindow.Add (btnPopup);
 
-        btnPopup.Accepted += (s, e) =>
+        btnPopup.Accepting += (s, e) =>
                            {
                                Rectangle viewToScreen = btnPopup.ViewportToScreen (top.Frame);
 

+ 3 - 3
UnitTests/Views/TreeViewTests.cs

@@ -1344,7 +1344,7 @@ oot two
         var treeView = new TreeView ();
         var accepted = false;
 
-        treeView.Accepted += OnAccept;
+        treeView.Accepting += OnAccept;
         treeView.InvokeCommand (Command.HotKey);
 
         Assert.False (accepted);
@@ -1365,7 +1365,7 @@ oot two
         var activated = false;
         object selectedObject = null;
 
-        treeView.Accepted += Accept;
+        treeView.Accepting += Accept;
         treeView.ObjectActivated += ObjectActivated;
 
         treeView.InvokeCommand (Command.Accept);
@@ -1393,7 +1393,7 @@ oot two
         var activated = false;
         object selectedObject = null;
 
-        treeView.Accepted += Accept;
+        treeView.Accepting += Accept;
         treeView.ObjectActivated += ObjectActivated;
 
         treeView.InvokeCommand (Command.Accept);