Gabriele Tedeschi
Gabriele Tedeschi

Reputation: 37

Scroll in editor Net Maui Mac catalyst

I've been trying for hours but without results to make the scroll of an editor work in my net maui project.

<Frame>
x:Name="F_MessaggioDaInviare"
Grid.Column="0"
Margin="0,0,0,0"
Padding="5"
BackgroundColor="LightGreen"
BorderColor="#3CB371"
CornerRadius="5"
HasShadow="False"
VerticalOptions="Fill">

    <Editor
    AutoSize="Disabled"
    MaxLength="1000"
    x:Name="E_MessaggioDaInviare"
    Margin="5,0,0,0"
    BackgroundColor="#3CB371"
    TextColor="LightGreen"
    FontSize="14"
    IsTextPredictionEnabled="False"
    FontAutoScalingEnabled="False"
    TextChanged="E_MessaggioDaInviare_TextChanged"
    />
</Frame>

Here I only found this: How to fix the absence of scrolling in Editor inside of ScrollView in MAUI? Scrollview is a good idea but i'm not able to scroll in you bottom of editor automatically.

I also thought about enlarging vertically the editor when the text wraps. but if you don't hit enter it's all on one line (newline depends on the width of the editor).

I try to set "HeightRequest", nothing; I tested, the height of the editor in pixels remains the same even if there are 20 lines of text inside.

Thank you so much!

Upvotes: 0

Views: 555

Answers (1)

Liqun Shen-MSFT
Liqun Shen-MSFT

Reputation: 8220

This is a known issue on GitHub: Editors not scrollable on iOS/Catalyst #12485.

From the comment, we can see that this issue has been fixed in .NET8. I have tested with the latest .NET8 Preview7 and this issue has been fixed now.

And .NET8 preview is supported in VS for mac 2022 now. If you want to have a try, you could refer to Announcing .NET MAUI in .NET 8 Preview 7: Keyboard Accelerators.

Hope it helps!

Upvotes: 0

Related Questions