net maui windows platform how to make label wordwrap when I make the app smaller ?

Sami 966 Reputation points
2024-03-16T19:26:32.89+00:00

I have created BindableLayout inside Label when I make the desktop app smaller then screensize if the content of label is so long must be wordwrap and then app is larger width content has to be full content...but inside of item of label is not wordwrap, dissapears how can I fix it..thanks

<StackLayout  x:Name="ExtendedItemsListing" Grid.Row="1" Orientation="Vertical" BindableLayout.ItemsSource="{Binding MyList}">
 <BindableLayout.ItemTemplate>
         <DataTemplate>

             <Grid x:Name="titleGrid" HeightRequest="45">

                 <Label Text="{Binding Title}" MaxLines="2" LineBreakMode="WordWrap" />

                 </Grid>

         </DataTemplate>

     </BindableLayout.ItemTemplate>

 </StackLayout>
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,514 questions
{count} votes

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.