Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Enhancement] ImageButton #1724

Closed
StephaneDelcroix opened this issue Jan 29, 2018 · 2 comments · Fixed by #4436
Closed

[Enhancement] ImageButton #1724

StephaneDelcroix opened this issue Jan 29, 2018 · 2 comments · Fixed by #4436

Comments

@StephaneDelcroix
Copy link
Member

StephaneDelcroix commented Jan 29, 2018

Rationale

The current Button.Image property is mainly for displaying a small icon next to the text.

To avoid breaking changes, we should create a new ImageButton control. Both Button and ImageButton should derive from a common ButtonBase.

Implementation

see Button API, but skip the Label

Implementation on Android, iOS, UWP in renderers.

Backward Compatibility

Difficulty: Medium

@samhouts
Copy link
Member

I feel like this might be better as a new control instead of using Button.Image. That will prevent us from breaking old layouts. Plus, we probably want to use the native ImageButton controls, so we'll have a lot of code switches if we just reuse the same control.

@samhouts samhouts moved this from Backlog to Ready for Implementation in Enhancements Feb 1, 2018
@PureWeen PureWeen self-assigned this Feb 5, 2018
@PureWeen PureWeen moved this from Ready for Implementation to In Progress in Enhancements Feb 5, 2018
@PureWeen
Copy link
Contributor

PureWeen commented Feb 5, 2018

@StephaneDelcroix @samhouts
I'm thinking for this we'll want to implement different images for different states Focused, Pressed, Normal, Disabled. It feels like the states aspect of image buttons are what differentiate it from just a Button with an Image.

The Image Button in the xamarin forms labs kind of captures what I'm thinking
https://github.com/XLabs/Xamarin-Forms-Labs/blob/master/src/Forms/XLabs.Forms/Controls/ImageButton.cs

Android is really the only platform that has a specific "ImageButton" which derives from ImageView opposed to TextView and who's main differentiating features are a lack of a "setText" method and the idea of PushStates

iOS sets the image of a button via UIControlState

And with UWP we'd have to use VisualStates

But I feel like with this one we'll want to add a state structure or just properties that lets you depict the image to use for Focused, Pressed, Normal, Disabled

Or I know there's a VisualStateManager coming to Forms. Would it be better to just leverage that once it's prime time? @hartez

@PureWeen PureWeen moved this from In Progress to Ready for Implementation in Enhancements Feb 5, 2018
@PureWeen PureWeen moved this from Ready for Implementation to In Progress in Enhancements Feb 7, 2018
@PureWeen PureWeen mentioned this issue Mar 2, 2018
4 tasks
@samhouts samhouts added this to Ready in v3.1.0 via automation Apr 12, 2018
@samhouts samhouts moved this from Ready to In Progress in v3.1.0 Apr 12, 2018
PureWeen added a commit that referenced this issue May 1, 2018
PureWeen added a commit that referenced this issue May 7, 2018
PureWeen added a commit that referenced this issue May 7, 2018
@samhouts samhouts added this to In Progress in v3.6.0 May 7, 2018
@samhouts samhouts removed this from In Progress in v3.1.0 May 7, 2018
@samhouts samhouts removed this from In Progress in v3.6.0 May 18, 2018
@samhouts samhouts added this to In Progress in v3.1.0 May 18, 2018
@samhouts samhouts added this to In Progress in v3.6.0 May 18, 2018
@samhouts samhouts removed this from In Progress in v3.1.0 May 18, 2018
@samhouts samhouts removed this from In Progress in v3.6.0 May 21, 2018
@samhouts samhouts added this to In Progress in v3.1.0 May 21, 2018
@samhouts samhouts removed this from In Progress in v3.1.0 May 23, 2018
@samhouts samhouts added this to In Progress in v3.2.0 Jun 26, 2018
@samhouts samhouts moved this from In Progress to Done in v3.5.0 Feb 14, 2019
@samhouts samhouts removed this from Done in v3.5.0 Feb 14, 2019
@samhouts samhouts added this to In Progress in v3.5.0 Feb 14, 2019
@samhouts samhouts moved this from In Progress to Done in v3.5.0 Feb 15, 2019
@samhouts samhouts removed this from Done in v3.5.0 Feb 15, 2019
@samhouts samhouts added this to In Progress in v3.5.0 Feb 19, 2019
@samhouts samhouts moved this from In Progress to Done in v3.5.0 Feb 19, 2019
@samhouts samhouts removed this from Done in v3.5.0 Feb 20, 2019
@samhouts samhouts added this to In Progress in v3.5.0 Feb 21, 2019
@samhouts samhouts moved this from In Progress to Done in v3.5.0 Feb 21, 2019
@samhouts samhouts removed this from Done in v3.5.0 Feb 21, 2019
@samhouts samhouts added this to In Progress in v3.5.0 Feb 21, 2019
@samhouts samhouts moved this from In Progress to Done in v3.5.0 Feb 22, 2019
@samhouts samhouts removed this from Done in v3.5.0 Feb 22, 2019
@samhouts samhouts added this to In Progress in v3.5.0 Feb 22, 2019
@samhouts samhouts moved this from In Progress to Done in v3.5.0 Feb 25, 2019
@samhouts samhouts removed this from Done in v3.5.0 Feb 25, 2019
@samhouts samhouts added this to In Progress in v3.5.0 Feb 25, 2019
@samhouts samhouts moved this from In Progress to Done in v3.5.0 Feb 26, 2019
@samhouts samhouts removed this from Done in v3.5.0 Feb 26, 2019
@samhouts samhouts added this to In Progress in v3.5.0 Feb 26, 2019
@samhouts samhouts moved this from In Progress to Done in v3.5.0 Feb 27, 2019
@samhouts samhouts removed this from Done in v3.5.0 Feb 27, 2019
@samhouts samhouts added this to In Progress in v3.5.0 Feb 28, 2019
@samhouts samhouts moved this from In Progress to Done in v3.5.0 Feb 28, 2019
@samhouts samhouts removed this from Done in v3.5.0 Feb 28, 2019
@samhouts samhouts added this to In Progress in v3.5.0 Mar 1, 2019
@samhouts samhouts moved this from In Progress to Done in v3.5.0 Mar 1, 2019
@samhouts samhouts removed this from Done in v3.5.0 Mar 1, 2019
@samhouts samhouts added this to In Progress in v3.5.0 Mar 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Sprint 141
  
Ready for Review (Issues)
Sprint 142
  
In progress
Sprint 143
  
In progress
Sprint 144
  
Done
v3.4.0
  
Done
v3.5.0
  
In Progress
Development

Successfully merging a pull request may close this issue.

4 participants