maui icon indicating copy to clipboard operation
maui copied to clipboard

LineBreakMode cannot be used on a button on Windows

Open pekspro opened this issue 3 years ago • 3 comments
trafficstars

Description

It looks like the LineBreakMode value on buttons is ignored on Windows. Here I have two identical buttons where the text doesn't fit, but the lower on has set LineBreakMode to TailTruncation:

image

But it does work on Android:

image

Also, note that you cannot see the beginning of the text on Windows.

Steps to Reproduce

  1. Create a new MAUI app.
  2. Update MainPage.xaml:
<ScrollView>
    <VerticalStackLayout 
        Spacing="25" 
        Padding="30,0" 
        Margin="0,20,0,0"
        >

        <Button 
            Text="one two three four five six seven eight nine ten"
            MaximumWidthRequest="300"
            HorizontalOptions="Center" />

        <Button 
            Text="one two three four five six seven eight nine ten"
            MaximumWidthRequest="300"
            LineBreakMode="TailTruncation"
            HorizontalOptions="Center" />

    </VerticalStackLayout>
</ScrollView>

Link to public reproduction project repository

https://github.com/pekspro/MauiIssues/tree/10553_LineBreakMode_cannot_be_used_on_a_button_on_Windows

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows, I was not able test on other platforms

Affected platform versions

Windows 10.0.17763.0, Android 11

Did you find any workaround?

No response

Relevant log output

No response

pekspro avatar Oct 07 '22 20:10 pekspro

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost avatar Oct 07 '22 21:10 ghost

Duplicated https://github.com/dotnet/maui/issues/9277

jsuarezruiz avatar Oct 11 '22 10:10 jsuarezruiz

I've updated sample application to .NET 7. The same issue remains.

pekspro avatar Nov 11 '22 17:11 pekspro

Duplicate of #9277

hartez avatar Jan 27 '23 22:01 hartez