maui
maui copied to clipboard
LineBreakMode cannot be used on a button on Windows
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:

But it does work on Android:

Also, note that you cannot see the beginning of the text on Windows.
Steps to Reproduce
- Create a new MAUI app.
- 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
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.
Duplicated https://github.com/dotnet/maui/issues/9277
I've updated sample application to .NET 7. The same issue remains.
Duplicate of #9277