Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.Net Maui XAML Input field component

I can't seem to find a simple text Input field to use in a .net maui xaml app. Looking at the docs in the User interface/Controls/Views section there is a a number of components handling user interaction/input such as checkbox and slider and even a searchfield-component (Which to me should only be a specialized input field), but no text input.

How do I make a Input field using Xaml in .Net Maui?

(I did find telerik, but I think it cost money and I was just looking for the "default" option)

like image 699
Gustav Avatar asked Feb 03 '26 16:02

Gustav


2 Answers

UPDATE:

So now the Microsoft docs have been updated,

Editor Docs

Entry Docs

OG ANSWER:

From what I understand from the question you are either looking for an Editor or an Entry.

I am guessing the documentation is still incomplete or is incorrect

A basic implementation for it would look something like that:

Small textbox:

<Entry
  MaxLength="20"
  Style="{StaticResource CommonEntryStyle}"
  Text="This is the text." />

Multiline:

<Editor
  MaxLength="20"
  Style="{StaticResource CommonEditorStyle}"
  Text="This is the text." />
like image 157
FreakyAli Avatar answered Feb 05 '26 07:02

FreakyAli


For anyone that finds this like I did, the documentation is available now since June:

Single line Entry component

Multi-line Editor component

like image 25
jwatts1980 Avatar answered Feb 05 '26 08:02

jwatts1980



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!