-1

Im looking for better picker because Xamarin.Forms picker is really bad and I dont want like that, Is there any custom picker or something like comboBox?

i want Like This

BySuspect
  • 13
  • 5
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jul 07 '22 at 09:15

3 Answers3

1

Think it's not possible but you could create your custom picker dialog design following this post Apply styles on Picker items in Xamarin Forms.

MrSpt
  • 499
  • 3
  • 16
0

Following the previous answer, you could also use SyncFusion Xamarin ComboBox, tho it might need a license (not sure)

The Website contains information about it as well as code samples and examples on how to set it up, also have other "Types" of ComboBox.

AcisSys
  • 51
  • 1
  • 8
  • The pricing can be found here https://www.syncfusion.com/sales/products – MrSpt Jul 07 '22 at 10:33
  • do you NEED a license tho? I've been using said libraries without purchasing anything, it just sends a pop-up at the beginning of the program – AcisSys Jul 07 '22 at 10:38
  • The trial license is temporary. The Community License provides free access to Syncfusion Essential Studio products for companies and individuals with less than $1 million USD in annual gross revenue and 5 or fewer developers. – MrSpt Jul 07 '22 at 10:41
0

You could use Xamarin.Forms.ComboBox. Install it from Manage NuGet Packages.

Xaml:

  <combobox:ComboBox x:Name="comboBox" 
                           ItemsSource="{Binding ItemsSource}"                                   
                           SelectedItemChanged="ComboBox_SelectedItemChanged"                                
                           Visual="Material">
            <combobox:ComboBox.ItemTemplate>
                <DataTemplate>
                    <ViewCell>
                        <Label Text="{Binding .}" Padding="5,5,0,0"/>
                    </ViewCell>
                </DataTemplate>
            </combobox:ComboBox.ItemTemplate>
        </combobox:ComboBox>

Code:

public partial class Page3 : ContentPage
{
    public Page3()
    {
        InitializeComponent();
        this.BindingContext=new Page3ViewModel();
    }

    private void ComboBox_SelectedItemChanged(object sender, SelectedItemChangedEventArgs e)
    {
        comboBox.Text = comboBox.SelectedItem.ToString();
    }       
}

public class Page3ViewModel
{
    public List<string> ItemsSource { get; set; }   
    public Page3ViewModel()
    {
        ItemsSource = new List<string>()
        {
            "Item1",
            "Item2",
            "Item3",
            "Item4"
        };

    }
  }
  }

enter image description here

Wendy Zang - MSFT
  • 10,509
  • 1
  • 7
  • 17