CollectionView can't scroll ?

Fei Xu 490 Reputation points
2023-04-06T13:42:50.3466667+00:00

ColletctionView can't scroll . No document show how to set it . maui sample can't scroll too. No matter how I operate, collectionview have not any scrolling action. \maui-samples-main\6.0\UserInterface\Views\CollectionViewDemos\CollectionViewDemos\Views\Scrolling\ScrollToByIndexPage.xaml no scroll

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,033 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 81,021 Reputation points Microsoft External Staff
    2023-04-07T01:54:47.93+00:00

    Hello,

    This is a known issue in MAUI:CollectionView not scrolling inside a StackLayout or without setting HeightRequest .

    Here is a workaround, you need to set a vaule of HeightRequest in <CollectionView>.

    <CollectionView x:Name="cvScores" Margin="5" ItemsSource="{Binding Scores}"  SelectionMode="Single" HeightRequest="800" >
    

    Best Regards, Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.