now with less flickering
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
|
||||
namespace Toolkit.UI.Controls.Avalonia;
|
||||
@@ -6,6 +7,15 @@ namespace Toolkit.UI.Controls.Avalonia;
|
||||
public class SettingsExpanderToggleButton :
|
||||
ToggleButton
|
||||
{
|
||||
public static readonly StyledProperty<bool> IsToggleableProperty =
|
||||
AvaloniaProperty.Register<SettingsExpanderToggleButton, bool>(nameof(IsToggleable));
|
||||
|
||||
public object IsToggleable
|
||||
{
|
||||
get => GetValue(IsToggleableProperty);
|
||||
set => SetValue(IsToggleableProperty, value);
|
||||
}
|
||||
|
||||
protected override void OnKeyDown(KeyEventArgs args)
|
||||
{
|
||||
if (args.Key is not Key.Space)
|
||||
|
||||
Reference in New Issue
Block a user