Skip to content

Avalonia TextBox in AvaloniaView does not stretch on Android #35

@emilsteen

Description

@emilsteen

If you add an TextBox (probably any control) in an AvaloniaView, as in the MauiSample in this repo, it does not stretch.
The same TextBox in a "pure" Avalonia project always stretches to the full parent width.
It always adjusts the width to the initial text width.
If you try this in Windows (with the latest commit in this repo), it does stretch, but not to the full width.

Is this a known issue and is there a workaround?
I've just ran out of ideas to workaround this, except setting a fixed Width.

I've made a test repository while testing this and tried to remove all other reasons that stretching did not work.
https://github.com/emilsteen/AvaloniaMauiHybridControlWidth

TextBox in Avalonia

Image

TextBox in Avalonia.Maui

Image

Short TextBox in Avalonia.Maui

Image

AvaloniaView width in Avalonia.Maui

Image

TextBox in Avalonia.Maui on Windows

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions