From ecd50c02dc80d2ae7e583adf10d2f7b105762cbd Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 16 Jul 2024 15:07:14 +0200 Subject: [PATCH] Don't BringIntoViewOnFocusChange in Carousel. Carousel can't actually scroll controls into view because it's a paging control so this property doesn't make much sense. But what it does affect is other scroll viewers that are contained in it. If a control is focused within a scroll viewer within a carousel, then `BringIntoView` will be invoked by the carousel scroll viewer, even though the inner scroll viewer has `BringIntoViewOnFocusChange = false`. --- src/Avalonia.Themes.Fluent/Controls/Carousel.xaml | 1 + src/Avalonia.Themes.Simple/Controls/Carousel.xaml | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Avalonia.Themes.Fluent/Controls/Carousel.xaml b/src/Avalonia.Themes.Fluent/Controls/Carousel.xaml index b94ef9b5d91..0ac46d00b25 100644 --- a/src/Avalonia.Themes.Fluent/Controls/Carousel.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/Carousel.xaml @@ -8,6 +8,7 @@ Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" + BringIntoViewOnFocusChange="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">