Radio Button in PCL Project

smhasansmhasan KWMember ✭✭
edited March 2016 in Xamarin.Forms

Hi
I am trying to use radio buttons in my PCL project, unfortunately I did not get any success, even I used XLabs, but failed to keep radio button horizontal, please suggest me how to use radio button with image in PCL, XAML or c# code

Answers

  • ThomasBurkhartThomasBurkhart DEMember ✭✭✭✭

    It wuld be helpful if you could post the code what you already tried

  • smhasansmhasan KWMember ✭✭

    Hi @ThomasBurkhart
    Please get below my code which I get from XLabs

    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />    
        <RowDefinition Height="*" />
        <RowDefinition Height="100" />
    </Grid.RowDefinitions>
    
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="300" />
    </Grid.ColumnDefinitions>
    <controls:BindableRadioGroup Grid.Row="1" BackgroundColor="Yellow"
     x:Name="ansPicker" 
     SelectedIndex="{Binding ItemSelected}" 
     TextColor="White" 
     FontName="AmericanTypewriter"
        Orientation="Horizontal"
     VerticalOptions="CenterAndExpand"
     HorizontalOptions="CenterAndExpand" />
    

  • hi, @smhasan, you were able to solve the problem

  • smhasansmhasan KWMember ✭✭

    Hi @JonathanVelasquez.1082 Sorry! it was too old question asked by me, that time I dropped idea to use radio button, instead I used switches,
    Now I can do this for you, if your requirement to use radio is on high priority

Sign In or Register to comment.