简体   繁体   中英

Maui windows desktop editor appearance

I would like to change the appearance of the Editor control in.Net Maui for Windows Desktop.

If you add a standard Editor to page, for example...

<Editor WidthRequest="300"/>

... a editor control is added which has quite a large amount of empty space between the text and the bottom border line...

在此处输入图像描述

This differs from the editors used in the windows desktop o/s itself which are normally quite compact...

在此处输入图像描述

Does anyone know if it is possible to change this?

You could try the VerticalTextAlignment="Center" to let the text in the center

<Editor WidthRequest="300" BackgroundColor="Yellow"  VerticalTextAlignment="Center" />

Also editor has MinimumHeightRequest and HeightRequest property as @ToolmakerSteve suggest in the comment, you could also try set these values.

There are also many properties for editor. For more info, you could refer to .Net MAUI Editor .

By the way, editor is used to enter and edit multiple lines of text. If you want only one line, you could also use an Entry ( .Net Maui Entry )

Hope it works for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM