Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Olaf-R opened this issue Apr 18, 2024 · 2 comments
Open

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

Olaf-R opened this issue Apr 18, 2024 · 2 comments
Labels
input-field-group question❔ Further information is requested

Comments

@Olaf-R
Copy link

Olaf-R commented Apr 18, 2024

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
Copy link
Owner

enisn commented Apr 18, 2024

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

@enisn enisn added question❔ Further information is requested input-field-group labels Apr 18, 2024
@Olaf-R
Copy link
Author

Olaf-R commented Apr 18, 2024

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
input-field-group question❔ Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants