Hello,
This type of control is not available out-of-the-box at MAUI at this time.
You can customize a similar layout using AbsoluteLayout
and Frame
Customization, please refer to the following code:
<StackLayout x:Name="stacklayout" HorizontalOptions="FillAndExpand">
<Label Text="test label">
</Label>
<AbsoluteLayout HorizontalOptions="FillAndExpand" Padding="20">
<Label Text="First Name" AbsoluteLayout.LayoutBounds="18,-13" Background="White" FontSize="14" ZIndex="99"/>
<Frame>
<Entry Margin="-10" WidthRequest="300"/>
</Frame>
</AbsoluteLayout>
</StackLayout>
If you also need to remove the underline from the Entry on Android, you can add the following code to the constructor of the page.
public MainPage()
{
InitializeComponent();
Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("NoUnderline", (h, v) =>
{
// Remove underline:
#if ANDROID
h.PlatformView.BackgroundTintList = Android.Content.Res.ColorStateList.ValueOf(Colors.Transparent.ToAndroid());
#endif
});
}
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.