Browse Source

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`.
pull/16352/head
Steven Kirk 2 years ago
committed by GitHub
parent
commit
dc884cf946
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      src/Avalonia.Themes.Fluent/Controls/Carousel.xaml
  2. 1
      src/Avalonia.Themes.Simple/Controls/Carousel.xaml

1
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">
<ItemsPresenter Name="PART_ItemsPresenter"

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

@ -8,6 +8,7 @@
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
BringIntoViewOnFocusChange="False"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden">
<ItemsPresenter Name="PART_ItemsPresenter"

Loading…
Cancel
Save