0

I'm not able to focus on any entry and not able to click on any checkbox/radio button inside bindable stack layout from second row in .net maui for iOS. android is working fine.

here is the screenshot of what i'm trying to do.

enter image description here

here is the code.

<VerticalStackLayout  BackgroundColor="{StaticResource 00dp}"  BindableLayout.ItemsSource="{Binding inspectionData.inspectionSection}">
<BindableLayout.ItemTemplate>
    <DataTemplate>    
        <VerticalStackLayout >                   
            <Border  Margin="10,20,10,10" Padding="0" BackgroundColor="{StaticResource 02dp}" Grid.Row="0" Style="{StaticResource roundedBorderStyleGray}" >
                                        <VerticalStackLayout>
                <HorizontalStackLayout >
                    <Label FontFamily="OpenSansSemiBold" Margin="15,20,10,10" Text="{Binding title}"  TextColor="{StaticResource TrackemOrange}"/>                         
                </HorizontalStackLayout>
                   
                 <VerticalStackLayout  BindableLayout.ItemsSource="{Binding inspectionQuestion}">
                    <BindableLayout.ItemTemplate>
                        <DataTemplate>
                             <VerticalStackLayout>
                                <Border Margin="10,0,10,10" Padding="5,5,5,5" BackgroundColor="{StaticResource 00dp}" Grid.Row="0" Style="{StaticResource roundedBorderStyleBlack}" >
                                
                                    <VerticalStackLayout   >
                                        <HorizontalStackLayout Padding="15,15,0,10" >
                                            <Label FontFamily="OpenSansSemiBold" Margin="0,3,0,0" FontSize="14"   Text="Q: "  TextColor="White"/>
                                            <Label Padding="15,3,0,10" FontFamily="OpenSansRegular"  Text="{Binding questionText}" TextColor="#FFFFFF"/>
                                        </HorizontalStackLayout>
                                                                        
                                        <BoxView   Background="#2D2D30" HeightRequest="1" />

                                        <VerticalStackLayout Padding="0,15,0,10" IsVisible="{Binding isShowText}">
                                            <Frame HasShadow="False"  BorderColor="#2D2D30" Background="transparent" Padding="0" Margin="15,0,15,0">

                                                <commonviews:BorderlessTextEntry  Text="{Binding answerText}"  HeightRequest="40" PlaceholderColor="{StaticResource TrackemDisabled}"  Placeholder="Answer" TextColor="{StaticResource TrackemWhite}" BackgroundColor="Transparent"  VerticalOptions="Start"/>
                                            </Frame>
                                        </VerticalStackLayout>

                                        <VerticalStackLayout Padding="0,15,0,10" IsVisible="{Binding allowComment}">

                                            <Frame HasShadow="False"  BorderColor="#2D2D30" Background="transparent" Padding="0" Margin="15,0,15,0" >

                                                <commonviews:BorderlessTextEntry  Text="{Binding comment}"  HeightRequest="40"  Placeholder="Comment" PlaceholderColor="{StaticResource TrackemDisabled}" TextColor="{StaticResource TrackemWhite}" BackgroundColor="Transparent"  VerticalOptions="Start"/>

                                            </Frame>

                                        </VerticalStackLayout>            
                                    </VerticalStackLayout>

                                 </Border>


                             </VerticalStackLayout>
                                                
                         </DataTemplate>
                    </BindableLayout.ItemTemplate>

                 </VerticalStackLayout>                    


                  </VerticalStackLayout>
            </Border>                       
        </VerticalStackLayout>
                           
    </DataTemplate>
</BindableLayout.ItemTemplate>

not sure, what i did wrong here. can someone please help me here. it's working as expected in android.

Vanjara Sweta
  • 81
  • 1
  • 10
  • Seems likely to be a Maui bug; I think it is worth reporting. If you want, make a new solution, with a new Maui project template. Copy just enough code from your project, with some fake "hardcoded" data, so anyone can build and run, to see the symptom. Put solution in a public github repo. Create a new Maui issue at `github maui issues`. Describe like you did here, and add link to repo. Then add a link here at StackOverflow, to that issue. – ToolmakerSteve May 24 '23 at 20:40

1 Answers1

1

from second row is the essential point here.

<VerticalStackLayout VerticalOptions="FillAndExpand"> on ItemTemplate.

You tell each item to try to take the entire height. That can't be a good idea.

  • Remove VerticalOptions.
ToolmakerSteve
  • 18,547
  • 14
  • 94
  • 196