More controls?

Hello!

Is Xamarin planning to add more controls to Xamarin.Forms?
I'm talking about some very basic controls, such as CheckBox, RadioButton, AutoCompleteBox and those basic ones.

Tagged:

Rejected · Last Updated

Without concrete proposals, this thread does not conform to the forum guidelines.

Posts

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    CheckBox and RadioButton don't exist across the three major mobile platforms. Xamarin exists in the "least common denominator" space. If iOS, Android and UWP don't all support a control then it isn't in Xamarin.

    You'll have to either update your expectations to modern mobile platforms: IE-Switch instead of CheckBox
    Or create custom renderer for the controls you want.
    Or place native controls on your Xamarin.Forms UI.
    Or google around for a NuGet package that has what you're looking for already created.

  • ShimmyWeitzhandlerShimmyWeitzhandler USMember ✭✭✭
    edited April 2017

    Sounds fair.
    I wish XLab would have been a bit smaller. It's gone so big, I can't get to build it on my machine.
    Anyway, what I'm gonna do is incorporate some of the XLabs controls in my solution.
    Thanks for your response.

    Your 2nd link is broken, you prob meant this.

  • NashZhouNashZhou USMember ✭✭✭
    edited May 2017

    I don't know how intuitive XLabs check box and radio button are cause I never used it, but you can simply add a tap gesture to an image and change the image based on a boolean.

    <Image Source="unchecked.jpg">
        <Image.GestureRecognizers>
            <TapGestureRecognizer
                    Tapped="OnTapGestureRecognizerTapped" />
      </Image.GestureRecognizers>
    </Image>
    
    void OnTapGestureRecognizerTapped(object sender, EventArgs args) {
        //Set a boolean somewhere in the file and change it when the image is tapped
        isButtonChecked = !isButtonChecked;
        var imageSender = (Image)sender;
        if (isButtonChecked) {
            imageSender.Source = "checked.jpg";
        } else {
            imageSender.Source = "unchecked.jpg";
        }
    }
    
  • ShimmyWeitzhandlerShimmyWeitzhandler USMember ✭✭✭

    @NashZhou
    I forked XLabs control into a private tiny library and their RadioButton works great on UWP (not yet tested on other plats).

    @ClintStLaurent said:
    Xamarin exists in the "least common denominator" space.

    Is it always gonna be like this?
    Why not have more controls in the library as extended controls that not necessarily translate to native controls, perhaps built on the existing XF controls? Do you know what's the future plans?

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    @ClintStLaurent it's right.

    btw I think you can add native controls inside your xaml
    https://blog.xamarin.com/adding-bindable-native-views-directly-to-xaml/

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @AlessandroCaliaro said:
    btw I think you can add native controls inside your xaml

    Yep. That was my third suggestion.

    @ClintStLaurent said:
    You'll have to either update your expectations to modern mobile platforms: IE-Switch instead of CheckBox
    Or create custom renderer for the controls you want.
    Or place native controls on your Xamarin.Forms UI.
    Or google around for a NuGet package that has what you're looking for already created.

  • ShimmyWeitzhandlerShimmyWeitzhandler USMember ✭✭✭
    edited May 2017

    WOW rereading it now I discover it's meant to be used in the PCL, that's amazing indeed!

    My common project case is LoB apps, and for those CheckBoxes and RadioButtons are a must. Anyway embedding native views changes the whole story, since I don't need 5 projects to support a control!

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    And THERE'S the light bulb moment!
    :D

  • JulienRosenJulienRosen CAMember ✭✭✭✭

    CheckBoxes and RadioButtons just dont really exist in the mobile space.

    For example, open the settings app and choose a ringtone on your device. That is a good example of what a RadioButton alternative looks like.

  • ShimmyWeitzhandlerShimmyWeitzhandler USMember ✭✭✭

    You guys are right.
    But for LoB apps where you have a bunch of options and sub options and filling forms, switch is not always the right solution, especially since switch takes more space the a radio group etc.
    That being said, point's clear. AND I would still wanna see more controls on Xamarin one day.

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    you should take a look to github. there are some controls...

  • ShimmyWeitzhandlerShimmyWeitzhandler USMember ✭✭✭
    edited May 2017

    That's the problem, there is a gazillion. Not a single one that is officially adopted and maintained, with clear guidelines for the community to maintain it.
    Instead of everyone having to make his own controls, why not have a central place (like XLabs used to be) of em

This discussion has been closed.