|
|
@@ -69,6 +69,12 @@ namespace Avalonia.Controls
|
|
|
public static readonly StyledProperty<bool> IsSubMenuOpenProperty =
|
|
|
AvaloniaProperty.Register<MenuItem, bool>(nameof(IsSubMenuOpen));
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Defines the <see cref="StaysOpenOnClick"/> property.
|
|
|
+ /// </summary>
|
|
|
+ public static readonly StyledProperty<bool> StaysOpenOnClickProperty =
|
|
|
+ AvaloniaProperty.Register<MenuItem, bool>(nameof(StaysOpenOnClick));
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// Defines the <see cref="Click"/> event.
|
|
|
/// </summary>
|
|
|
@@ -265,6 +271,16 @@ namespace Avalonia.Controls
|
|
|
set { SetValue(IsSubMenuOpenProperty, value); }
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Gets or sets a value that indicates the submenu that this <see cref="MenuItem"/> is
|
|
|
+ /// within should not close when this item is clicked.
|
|
|
+ /// </summary>
|
|
|
+ public bool StaysOpenOnClick
|
|
|
+ {
|
|
|
+ get { return GetValue(StaysOpenOnClickProperty); }
|
|
|
+ set { SetValue(StaysOpenOnClickProperty, value); }
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// Gets or sets a value that indicates whether the <see cref="MenuItem"/> has a submenu.
|
|
|
/// </summary>
|