Closed BobDickinson closed 10 years ago
I added a "caption" label to the iOS toggle switch (it's basically a composite control with a label and a switch). So it not acts more or less like Windows/Android. FWIW, Windows and WinPhone toggle switches are now more or less the same (the styling is different).
As it stands now, there is a "caption" attribute, which is basically the "what does this switch do" label.
There are also an "onLabel" and "offLabel" attributes for small text that will be used to reflect the toggle state (typically something like on/off or yes/no). On Windows/WinPhone this text will be displayed to the left of the switch. On Android this text will be display on the toggle switch itself. On iOS this text will not be displayed (so the advice is to stick with switches that have an obvious meaning with only the caption for context).
I think this is as done as it's going to get.
Currently different platforms implement different parts of the toggle control. Windows has a caption, a text control that display different values when the control is in each state, and labels for the control states themselves. iOS just has a toggle switch that can only say "On" and "Off". Android and WinPhone are somewhere in between.
I think what we want on all platforms is a toggle switch that always says On/Off, and an optional label (to which any font attributes will apply), and that's it.
If you want a "caption", you can just add a text label control. If you want the label next to the toggle switch to change based on the switch position, that's easy enough to do with data binding.