maui
maui copied to clipboard
Setting ScrollView.Orientation has no effect on iOS
Description
No matter what value I set for a ScrollView's Orientation property, I can scroll in all directions on iOS.
Steps to Reproduce
- Create a new .NET MAUI App (I'm targeting .NET 6.0, not sure if that makes a difference)
- Replace the XAML of the MainPage with
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MyMAUIApp.MainPage">
<ScrollView Orientation="Vertical" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Red">
<BoxView HeightRequest="800" WidthRequest="800" Color="Transparent">
<BoxView.Background>
<LinearGradientBrush>
<GradientStop Color="Yellow" Offset="0.1" />
<GradientStop Color="Green" Offset="1.0" />
</LinearGradientBrush>
</BoxView.Background>
</BoxView>
</ScrollView>
</ContentPage>
- Remove everything but the constructor in MainPage.xaml.cs, to make sure the project compiles
- Run the app on an iPhone SE simulator
- Observe that you can scroll both horizontally and vertically (see screenshot above)
Link to public reproduction project repository
n/a
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16.2
Did you find any workaround?
Listen to the Scrolled
event and make sure it always scrolls to 0, e.g. with
HorizontalScrollView.ScrollToAsync(e.ScrollX, 0, false);
Relevant log output
No response
Perhaps related: https://github.com/dotnet/maui/issues/7811 and https://github.com/dotnet/maui/issues/7979
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.