-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Enhancement] Button/Label Parity #1668
Comments
@kingces95 @samhouts This appears to mostly be a duplicate of #1659. The only difference I'm seeing is that this issue calls for |
@davidortinau I would like to take this issue too, since I'm working on #1659 |
@ice-j any progress on this? Any blockers we can help remove? |
@davidortinau XamarinFormsCommunity#2 (comment) The way I have implemented it, it also aligns the image (when set) on the button. I'm waiting on any ideas if you have to approach this differently. |
Would be amazing to be able align image for each position on the button(Top, Center, Right, Left), mainly 'Center' that usually is needed a workaround with an image to do this. |
While in Android it still looks ok. (This is a bit suboptimal way of fixing it, so it's just a workaround to the fact that VerticalTextAlignment doesn't exist yet, but might be coming soon: xamarin/Xamarin.Forms#1668 )
@ice-j Are we ready to move this pull request to the main repository? |
@ice-j Monthly ping! Would you like to submit the pull request here? Thanks! |
Oh, sorry, there was an unanswered question on the community PR, that's why I didn't move it here, but I will do this weekend and maybe I can continue work here if anyone else doesn't want to take the ticket. |
@ice-j ping |
@ice-j @StephaneDelcroix |
any news on this? |
@pictos |
@Happypig375 I know. For now that PR is solving this issue, which is related to this one. After that PR gets merged, I can work in |
@pictos I don't think it being removed from the "In Progress" column of vNext is a sign of merging. |
Ping - what is the current status of this? |
Its sad, such a basic feature already took more than two years and still no clue. 👎 |
come on, we missing the HorizontalTextAlignment & VerticalTextAlignment properties in the Button. Please any updates on this? |
Hello, any news about this issue? it's really annoying in some case |
If you use button in grid,the btton's text will be in left. it is bad!we need this change! |
I think it's quite bad that one of the most frequently used UI elements, a button, does not allow to align its text. These kinds of issues should be absolute top priority for the Xamarin team in my opinion, as it is almost impossible to do anything with Xamarin.Forms without re-creating the entire set of UI widgets. I can not understand how this issue has not even been started yet. Is there any way the team could fix this as I am getting very tired of implementing primitive UI widgets all the time? I thought this was the exact problem Xamarin.Forms was supposed to solve. Thank you for considering. |
@samhouts How are the sprints planned for the Xamarin.Forms team? Are people working on their pet projects, or is there a real vetting process? Please focus on the built-in components to have at least some kind of feature parity with the platforms. |
I think that the Xamarin.Forms team must be freestyling with things they want to work on, like the "Shell". It's a good example of something they put a lot of resources in which has no real benefit, as it is usable only if you make an application with exactly the components they felt like implementing. While at the same time the primitive UI controls are almost unusable. So I don't think this will get implemented as nobody feels like working on it, even though their product is quite unusable without a base set of features. Please prove me wrong! |
If there is one thing Xamarin should focus on, it is the 1606 bugs that are still open! |
The fact that Xamarin.Forms has roughly the same amount of bugs as open issues of mono really speaks for itself. |
Bugs are #1 for sure, that goes without saying. I was referring to development of new features. In that regard I really think they should focus on making the CORE work well. |
|
Still waiting for aligment |
any progress on this? |
The documentation for
This is actually not true since the text is always centered, so the spacing is actually between the button and the left-edge of the box the text is being centered in (leading to every button with an image having off-center text). This has been known for at least 5 years. It's insane that this still hasn't been fixed... |
We won't be investing in this for Xamarin.Forms anymore. I think steps have already been made with this in .NET MAUI. If this is still important to you, make sure to voice any concerns on the .NET MAUI repo. Thanks! |
i also got the feeling that they don't want to ruin the business model of third party component providers. It's the same with unity: have an abysmally outdated product, let a third party swoop in, make customer pay. I can already smell the nepotism |
for anyone still running into this issue: here's a hacky and Xamarin.Forms worthy (not meant as a compliment) workaround: Use a Label like this. You can style it like a button and don't need to write extra code for Android and iOS, bc we shouldn't have a DX from the 90s...
BUT: the tap highlighting wont be there. if someone wants to improve on that that'd be great |
Rationale
A Button containing text is basically a fancy Label; Options for formatting text on Label make sense to expose on Button. Specifically, justification and line wrapping options are available on Label but not on Button.
see https://forums.xamarin.com/discussion/36779/multi-line-text-on-buttons-how-to-get-consistent-across-platforms
Implementation
Adopt same API on Label for text justification and line wrapping. At least expose
HorizontalTextAlignmentProperty
,VerticalTextAlignmentProperty
, andLineBreakModeProperty
.Expected Result
User is able to justify and control button text using label API.
Implications for CSS
None.
Backward Compatibility
As discussed in the thread, the different platforms have different defaults. We may have to introduce new enum values like
Legacy
orUndefined
orDefault
.Difficulty : Moderate
Anything with potential backwards compatibility issues is moderately difficult. Also, the text matrix for this work would be large and clip detection is non-trivial.
The text was updated successfully, but these errors were encountered: