Question Problem with expander in collectionView

Hello

I'm sorry
Here is my question properly asked :

I'm working on MAUI C# application desktop.I need to put many expander in collectionView.

Here is my code in view :

My view code:
 <CollectionView x:Name="question" ItemsSource="{Binding Audit.Questions}" IsVisible="false"  VerticalScrollBarVisibility="Default">
     <CollectionView.ItemTemplate>
         <DataTemplate x:DataType="model:Question">
             <VerticalStackLayout>
                 <ScrollView >
                     <mct:Expander x:Name="questionz" IsExpanded="false">
                         <mct:Expander.Header>
                             <Grid BackgroundColor="LightGray" HeightRequest="100" MinimumHeightRequest="100">
                                 <Label Text="{Binding Intitule}" FontSize="16" Grid.Column="0"></Label>
                                 <Image  Source="exclamation_mark.png"
                                     HeightRequest="20"
                                     TranslationX="380"
                                     ToolTipProperties.Text="{Binding RappelJuridique}"/>
                             </Grid>
                         </mct:Expander.Header>
                         <mct:Expander.Content>
                             <StackLayout
                             MinimumHeightRequest="150">
                                 <HorizontalStackLayout   
                                 >
                                     <RadioButton
                                              x:Name="conforme"
                                              Content="Conforme"
                                              IsChecked="{Binding IsConforme}"
                                              Value="1"
                                              CheckedChanged="RadioButton_CheckedChanged">
                                     </RadioButton>
                                     <RadioButton
                                              x:Name="nonConforme"
                                              Content="Non conforme"
                                              IsChecked="{Binding IsConforme}"
                                              Value="0"
                                              CheckedChanged="RadioButton_CheckedChanged">
                                     </RadioButton>
                                     <RadioButton
                                              x:Name="nonFait"
                                              Content="non Fait"
                                              IsChecked="{Binding IsConforme}"
                                              Value=""
                                              CheckedChanged="RadioButton_CheckedChanged">
                                     </RadioButton>
                                 </HorizontalStackLayout>
                                 <Entry Placeholder="Commentaire" Text="{Binding Commentaire}" HeightRequest="100" ></Entry>
                             </StackLayout>
                         </mct:Expander.Content>
                     </mct:Expander>
                 </ScrollView>
             </VerticalStackLayout>
         </DataTemplate>
     </CollectionView.ItemTemplate>
 </CollectionView>


Behavior of last expanders is not OK

1698132060193.png


In this case I load 18 expanders in the collectionview.

Did someone have idea ?
Thanks by advance and sorry for my first post.
 
What happens if you don't use a ScrollView?
 
Is there physical screen space to accommodate those opened expanders? If not, is the expectation for the other expanders to collapse? Or is the expectation for a scroll bar to appear inside the collection view that spans all the expanders?
 
First, I don't think the ScrollView should be within the template. By declaring that there, you are saying that each item should have its own scrollbar.

Next, I think this open bug regarding the collection view is relevant to your situation:
 
Back
Top Bottom