Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TabView] CollectionView inside Tabview does not scroll #614

Open
graspbow opened this issue Mar 13, 2024 · 1 comment
Open

[TabView] CollectionView inside Tabview does not scroll #614

graspbow opened this issue Mar 13, 2024 · 1 comment
Labels
bug-report Potential bug that should be verified control-tabview

Comments

@graspbow
Copy link

graspbow commented Mar 13, 2024

I am using a TabView with a CollectionView in it. The CollectionView won't scroll unless I wrap it in a Grid and give it a HeightRequest(Which I would like to avoid).
Is there any other solution for this?

I have only tested this on Android.

This is the setup:

<material:TabView CachingStrategy="CacheOnLayout">
    <material:TabView.TabHeaderItemTemplate>
        <DataTemplate>
            <Button Text="{Binding Title}"
                    Command="{Binding Command}">
                <Button.Triggers>
                    <DataTrigger TargetType="Button"
                                 Binding="{Binding IsSelected}"
                                 Value="True">
                        <Setter Property="BackgroundColor"
                                Value="Orange" />
                        <Setter Property="TextColor"
                                Value="White" />
                    </DataTrigger>
                    <DataTrigger TargetType="Button"
                                 Binding="{Binding IsSelected}"
                                 Value="False">
                        <Setter Property="BackgroundColor"
                                Value="Gray" />
                        <Setter Property="TextColor"
                                Value="Black" />
                    </DataTrigger>
                </Button.Triggers>
            </Button>
        </DataTemplate>
    </material:TabView.TabHeaderItemTemplate>
    <material:TabItem Title="Tab1">
        <material:TabItem.ContentTemplate>
            <DataTemplate>
                <CollectionView ItemsSource="{Binding ToDoList}">
                    <CollectionView.ItemTemplate>
                        <DataTemplate>
                                <VerticalStackLayout>
                                    <Label Text="{Binding .}" />
                                    <Label Text="Test" />
                                </VerticalStackLayout>
                        </DataTemplate>
                    </CollectionView.ItemTemplate>
                </CollectionView>
            </DataTemplate>
        </material:TabItem.ContentTemplate>
    </material:TabItem>
    <material:TabItem Title="Tab2">
        <material:TabItem.ContentTemplate>
            <DataTemplate>
                <CollectionView ItemsSource="{Binding ProcessedList}">
                    <CollectionView.ItemTemplate>
                        <DataTemplate>
                                <Label Text="Test" />
                        </DataTemplate>
                    </CollectionView.ItemTemplate>
                </CollectionView>
            </DataTemplate>
        </material:TabItem.ContentTemplate>
    </material:TabItem>
</material:TabView>
@PenseeNumerique
Copy link

Have you tried using " ?

@enisn enisn added bug-report Potential bug that should be verified control-tabview labels May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Potential bug that should be verified control-tabview
Projects
None yet
Development

No branches or pull requests

3 participants