.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,507 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How to make the "Entry" element 100% of the width of its parent?
Hello,
The official recommended for filling Maui application controls is through Grid and using HorizontalOptions=“Fill”
.
Please refer to the following thread and sample code:
<Grid Padding="8">
<Border Stroke="Black" HorizontalOptions="Fill">
<Grid ColumnDefinitions="30,*" Padding="8">
<Image Grid.Column="0" Source="dotnet_bot.png"/>
<Entry Grid.Column="1" Placeholder="test" HorizontalOptions="Fill"/>
</Grid>
</Border>
</Grid>
Best Regards,
Alec Liu.
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.