Skip to content

Commit dc884cf

Browse files
authored
Don't BringIntoViewOnFocusChange in Carousel. (#16339)
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`.
1 parent 460a354 commit dc884cf

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Avalonia.Themes.Fluent/Controls/Carousel.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Background="{TemplateBinding Background}"
99
BorderBrush="{TemplateBinding BorderBrush}"
1010
BorderThickness="{TemplateBinding BorderThickness}"
11+
BringIntoViewOnFocusChange="False"
1112
HorizontalScrollBarVisibility="Hidden"
1213
VerticalScrollBarVisibility="Hidden">
1314
<ItemsPresenter Name="PART_ItemsPresenter"

src/Avalonia.Themes.Simple/Controls/Carousel.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Background="{TemplateBinding Background}"
99
BorderBrush="{TemplateBinding BorderBrush}"
1010
BorderThickness="{TemplateBinding BorderThickness}"
11+
BringIntoViewOnFocusChange="False"
1112
HorizontalScrollBarVisibility="Hidden"
1213
VerticalScrollBarVisibility="Hidden">
1314
<ItemsPresenter Name="PART_ItemsPresenter"

0 commit comments

Comments
 (0)