Skip to content

[iOS] FlowDirection = "RightToLeft" doesn't work with CV1 & CV2 #27711

@kubaflo

Description

@kubaflo

Description

Legacy Xamarin bugs related to this

xamarin/Xamarin.Forms#12633
xamarin/Xamarin.Forms#14149
xamarin/Xamarin.Forms#13165
xamarin/Xamarin.Forms#8759
xamarin/Xamarin.Forms#8260

CV - 2

cv2-before.mp4

CV - 1

cv1-before.mp4

Steps to Reproduce

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="Maui.Controls.Sample.MainPage"
             xmlns:local="clr-namespace:Maui.Controls.Sample">
    <VerticalStackLayout>
        <Switch x:Name="switch"
                AutomationId="switch"
                IsToggled="False"
                Toggled="switch_Toggled"/>
        <CollectionView x:Name="listView"
                        HeightRequest="500"
                        SelectionMode="Single"
                        FlowDirection="LeftToRight">
            <CollectionView.Header>
                <ContentView>
                    <HorizontalStackLayout>
                        <Label Text="This is a header with an image"/>
                        <Image HeightRequest="100"
                               WidthRequest="100"
                               Source="groceries.png"/>
                    </HorizontalStackLayout>
                </ContentView>
            </CollectionView.Header>

            <CollectionView.ItemsSource>
                <x:Array Type="{x:Type x:String}">
                    <x:String>Item 1</x:String>
                    <x:String>Item 2</x:String>
                    <x:String>Item 3</x:String>
                </x:Array>
            </CollectionView.ItemsSource>
            <CollectionView.ItemTemplate>
                <DataTemplate>
                    <HorizontalStackLayout>
                        <Border HorizontalOptions="Start"
                                Background="Red"
                                HeightRequest="10"
                                WidthRequest="10"/>
                        <Label  Text="{Binding}"
                                Padding="10,0,0,0"
                                FontSize="16"
                                TextColor="Black"/>
                    </HorizontalStackLayout>
                </DataTemplate>
            </CollectionView.ItemTemplate>
            <CollectionView.Footer>
                <Label Text="This is a simple footer"/>
            </CollectionView.Footer>
        </CollectionView>
    </VerticalStackLayout>
</ContentPage>

Link to public reproduction project repository

No response

Version with bug

9.0.30 SR3

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

No response

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions