enisn / UraniumUI

Uranium is a Free & Open-Source UI Kit for MAUI.
Apache License 2.0
982 stars 110 forks source link

EditorField ignores height of parent; color assignments not working #658

Open Olaf-R opened 3 weeks ago

Olaf-R commented 3 weeks ago

The EditorField is showing some unexpected behavior. While it does respect the height of the parent container for its outer height, this doesn't apply to the editor portion of the control.

Also, it doesn't seem to respect color setters properly. Here's a sample:

<Border Stroke="Red" Background="Transparent" HeightRequest="120" WidthRequest="300" Padding="15">
    <material:EditorField Title="Height Test" VerticalOptions="Fill" TextColor="Gray" Background="White"
                          InputBackgroundColor="LightPink" TitleColor="Cyan" BorderColor="MediumVioletRed" />
</Border>

grafik

In the above screenshot, the outer portion of the control has a white BG, but this should apply to the editor portion as well, which is black here when it should be LightPink.

Am I misunderstanding the concept or am I doing anything wrong?

enisn commented 3 weeks ago

Can you try to set MinimumHeightRequest for EditorField instead setting HeightRequest for Border?

Olaf-R commented 3 weeks ago

Thanks for responding so quickly! :-)

The Border's HeightRequest was just meant to demonstrate the issue.

In my real scenario the EditorField is hosted in a Grid where the Row that the EditorField sits in has its height set to *. The key here is that the editor (for entering notes) is to use (at least) whatever height is available on the screen. I can thus not set any minimum height without tampering the whole layout.

Did you also notice the color issues, i. e. that setting the InputBackgroundColor has no effect and that the Background is applied to the outer area of the control (which doesn't make much sense to me unless the control inherits its surrounding container's height)?