From dedc9c9f8967ab58c39b37e16fa461f6f9ab213a Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 23 Feb 2021 15:12:04 +0100 Subject: [PATCH 1/5] Fix Slider focus. Previously the `Slider` itself was not focusable but the repeat buttons were - instead make the slider focusable and the repeat buttons unfocusable. --- src/Avalonia.Controls/Slider.cs | 1 + src/Avalonia.Themes.Default/Slider.xaml | 1 + src/Avalonia.Themes.Fluent/Controls/Slider.xaml | 8 ++++---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Avalonia.Controls/Slider.cs b/src/Avalonia.Controls/Slider.cs index 74de33529a..849b768221 100644 --- a/src/Avalonia.Controls/Slider.cs +++ b/src/Avalonia.Controls/Slider.cs @@ -93,6 +93,7 @@ namespace Avalonia.Controls static Slider() { PressedMixin.Attach(); + FocusableProperty.OverrideDefaultValue(true); OrientationProperty.OverrideDefaultValue(typeof(Slider), Orientation.Horizontal); Thumb.DragStartedEvent.AddClassHandler((x, e) => x.OnThumbDragStarted(e), RoutingStrategies.Bubble); Thumb.DragCompletedEvent.AddClassHandler((x, e) => x.OnThumbDragCompleted(e), diff --git a/src/Avalonia.Themes.Default/Slider.xaml b/src/Avalonia.Themes.Default/Slider.xaml index ba4b1ee998..be698608c4 100644 --- a/src/Avalonia.Themes.Default/Slider.xaml +++ b/src/Avalonia.Themes.Default/Slider.xaml @@ -80,6 +80,7 @@