-
Notifications
You must be signed in to change notification settings - Fork 1.9k
GH-3106 Implemented LineBreakMode to Button #11147
Conversation
return; | ||
|
||
view.SetLineBreakMode(_element); | ||
_renderer.View.SetAllCaps(_element.TextTransform == TextTransform.Default); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Stephane Delcroix <stephane@delcroix.org>
When resizing a UWP app window using Test cases
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look OK, but the above bug spoils the UWP experience. Thoughts on how to proceed here? @StephaneDelcroix @nickrandolph
I'm inclined to reject until the bug is resolved.
textBlock.TextWrapping = TextWrapping.Wrap; | ||
break; | ||
case LineBreakMode.HeadTruncation: | ||
// TODO: This truncates at the end. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Remove TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.....and I think I may have added those myself 😅
DetermineTruncatedTextWrapping(textBlock); | ||
break; | ||
case LineBreakMode.MiddleTruncation: | ||
// TODO: This truncates at the end. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Remove TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@riverar, as you can see here those comments exist before my change, I just moved all the code around. I don't think this is a good idea to remove it.
Yep, I agree, that UWP bug seems a bit nasty. @pictos Wanna take a look at that? |
@pictos Very good! Thanks for clarifying! |
@pictos It looks like this may have broken this test: Are you able to run that locally? |
More information about the failing test: Android Fast Renderers only
|
@samhouts, if the test |
* Added LineBreakMode in the Button and TestAttributes * Added LineBreakMode implementation on Android platform * Added Issue into the Controls project * Removed unused method * Added UWP support for LineBreakMode * Implemented LineBreakMode on iOS * Update Xamarin.Forms.Core/Button.cs Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Rui Marinho <me@ruimarinho.net> fixes #3106
* Added LineBreakMode in the Button and TestAttributes * Added LineBreakMode implementation on Android platform * Added Issue into the Controls project * Removed unused method * Added UWP support for LineBreakMode * Implemented LineBreakMode on iOS * Update Xamarin.Forms.Core/Button.cs Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Rui Marinho <me@ruimarinho.net> fixes xamarin#3106
* Added LineBreakMode in the Button and TestAttributes * Added LineBreakMode implementation on Android platform * Added Issue into the Controls project * Removed unused method * Added UWP support for LineBreakMode * Implemented LineBreakMode on iOS * Update Xamarin.Forms.Core/Button.cs Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Rui Marinho <me@ruimarinho.net> fixes xamarin#3106
* Added LineBreakMode in the Button and TestAttributes * Added LineBreakMode implementation on Android platform * Added Issue into the Controls project * Removed unused method * Added UWP support for LineBreakMode * Implemented LineBreakMode on iOS * Update Xamarin.Forms.Core/Button.cs Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Rui Marinho <me@ruimarinho.net> fixes xamarin#3106
* Added LineBreakMode in the Button and TestAttributes * Added LineBreakMode implementation on Android platform * Added Issue into the Controls project * Removed unused method * Added UWP support for LineBreakMode * Implemented LineBreakMode on iOS * Update Xamarin.Forms.Core/Button.cs Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Rui Marinho <me@ruimarinho.net> fixes #3106
I'm using 5.0.0.1791-pre5 and LineBreakMode on Buttons, does not appear to exist? |
* Added LineBreakMode in the Button and TestAttributes * Added LineBreakMode implementation on Android platform * Added Issue into the Controls project * Removed unused method * Added UWP support for LineBreakMode * Implemented LineBreakMode on iOS * Update Xamarin.Forms.Core/Button.cs Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Rui Marinho <me@ruimarinho.net> fixes xamarin#3106
Why is the API for LineBreakMode still not included in |
@samhouts Heads up ^ |
cc @Redth |
* Added LineBreakMode in the Button and TestAttributes * Added LineBreakMode implementation on Android platform * Added Issue into the Controls project * Removed unused method * Added UWP support for LineBreakMode * Implemented LineBreakMode on iOS * Update Xamarin.Forms.Core/Button.cs Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Stephane Delcroix <stephane@delcroix.org> Co-authored-by: Rui Marinho <me@ruimarinho.net> fixes xamarin#3106
This comment was marked as off-topic.
This comment was marked as off-topic.
@samhouts Seems this change never made it out, are you tracking this? |
cc: @jfversluis |
Seems this was merged into main while we are releasing from 5.0.0 for a while. But this happened while I was not on the team so I can't give you the full context. Unfortunately, we don't really have a way for this to add this to Forms anymore as we're in maintanance mode and don't want to add any new APIs unless we really need to to support new platform OS features :( .NET MAUI was branched of main which does have all the changed including this one. So I guess it's time to update to .NET MAUI! |
Thanks for the reply |
Description of Change
I created this one because the #7810 was very old and painful to do a rebase.
Added the LineBreakMode to Button.
Issues Resolved
API Changes
Added:
Platforms Affected
Behavioral/Visual Changes
Now users can set a line break mode to texts on Button, the default value doesn't affect any user.
None
Before/After Screenshots
PR Checklist