-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Enhancement] Add CheckBox Text value #7299
Comments
Seems like something you could just write a custom view for and reuse throughout your app. Otherwise besides just adding the Text property you need to consider a dozen other things. Just to start, you would need to add font properties, text color, positioning of the text relative to the checkbox (left, right, above, how much space between the checkbox and the label). And then rewrite all of the renderers. |
Having CheckBox control without Text property is a strange implementation decision. Let's see what other platforms have: Android - has it Of course, we can write custom controls or custom renderers for many things... But then we could write same thing for current implementation of CheckBox... |
Displaying text next to CheckBox is very easy with a StackLayout. But what I want is when the text is clicked, the CheckBox should check/uncheck (toggle). Not only it should toggle but also it should give the proper feel of clicking - when text is pressed, the checkbox background should change to the pressed background. That is why I think text should be integrated in CheckBox. Something like a CheckBoxCell can also be implemented. |
I agree. This seems like pretty basic functionality; odd that it is missing. |
This is useful property. And we almost have Text property in RadioButton. In my opinion this property will be useful in Switch too. Because creating grid with two columns is boring. |
Maybe copy the approach from #11628 - Make Checkbox a TemplatedView that allows setting text or any other sort of content? |
If the approach in 11628 works out, that's likely what we'd end up doing. The main reason we didn't want to add a |
Summary
Adding a text field to the checkbox would make it easy to set a label on it. Currently we need to add label separately and set them together in a
StackLayout
API Changes
Intended Use Case
Adding a text field to checkbox would make it easy to set a label on it and it would save additional lines of code where we need to put both label and checkbox in
StackLayout
The text was updated successfully, but these errors were encountered: