Browse Source
Merge pull request #8160 from wieslawsoltes/fixes/FixPropertyRegistrations
pull/8163/head
Wiesław Šoltés
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
8 additions and
8 deletions
-
src/Avalonia.Controls/MenuBase.cs
-
src/Avalonia.Controls/MenuItem.cs
-
src/Avalonia.Controls/NativeMenuItemBase.cs
-
src/Avalonia.Controls/RepeatButton.cs
|
|
|
@ -18,8 +18,8 @@ namespace Avalonia.Controls |
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="IsOpen"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly DirectProperty<Menu, bool> IsOpenProperty = |
|
|
|
AvaloniaProperty.RegisterDirect<Menu, bool>( |
|
|
|
public static readonly DirectProperty<MenuBase, bool> IsOpenProperty = |
|
|
|
AvaloniaProperty.RegisterDirect<MenuBase, bool>( |
|
|
|
nameof(IsOpen), |
|
|
|
o => o.IsOpen); |
|
|
|
|
|
|
|
|
|
|
|
@ -85,13 +85,13 @@ namespace Avalonia.Controls |
|
|
|
/// Defines the <see cref="PointerEnterItem"/> event.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly RoutedEvent<PointerEventArgs> PointerEnterItemEvent = |
|
|
|
RoutedEvent.Register<InputElement, PointerEventArgs>(nameof(PointerEnterItem), RoutingStrategies.Bubble); |
|
|
|
RoutedEvent.Register<MenuItem, PointerEventArgs>(nameof(PointerEnterItem), RoutingStrategies.Bubble); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="PointerLeaveItem"/> event.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly RoutedEvent<PointerEventArgs> PointerLeaveItemEvent = |
|
|
|
RoutedEvent.Register<InputElement, PointerEventArgs>(nameof(PointerLeaveItem), RoutingStrategies.Bubble); |
|
|
|
RoutedEvent.Register<MenuItem, PointerEventArgs>(nameof(PointerLeaveItem), RoutingStrategies.Bubble); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="SubmenuOpened"/> event.
|
|
|
|
|
|
|
|
@ -11,8 +11,8 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static readonly DirectProperty<NativeMenuItem, NativeMenu?> ParentProperty = |
|
|
|
AvaloniaProperty.RegisterDirect<NativeMenuItem, NativeMenu?>("Parent", o => o.Parent, (o, v) => o.Parent = v); |
|
|
|
public static readonly DirectProperty<NativeMenuItemBase, NativeMenu?> ParentProperty = |
|
|
|
AvaloniaProperty.RegisterDirect<NativeMenuItemBase, NativeMenu?>("Parent", o => o.Parent, (o, v) => o.Parent = v); |
|
|
|
|
|
|
|
public NativeMenu? Parent |
|
|
|
{ |
|
|
|
|
|
|
|
@ -13,13 +13,13 @@ namespace Avalonia.Controls |
|
|
|
/// Defines the <see cref="Interval"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<int> IntervalProperty = |
|
|
|
AvaloniaProperty.Register<Button, int>(nameof(Interval), 100); |
|
|
|
AvaloniaProperty.Register<RepeatButton, int>(nameof(Interval), 100); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="Delay"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<int> DelayProperty = |
|
|
|
AvaloniaProperty.Register<Button, int>(nameof(Delay), 300); |
|
|
|
AvaloniaProperty.Register<RepeatButton, int>(nameof(Delay), 300); |
|
|
|
|
|
|
|
private DispatcherTimer? _repeatTimer; |
|
|
|
|
|
|
|
|