Georgi Koemdzhiev
Georgi Koemdzhiev

Reputation: 11931

Picker with custom Items [Xaml]

I am trying to figure out a way how to create a picker with custom items in XAML. I am not sure if it is possible to achieve this task only using xaml. The picker would have to contain items that consist of a label and a switch. The code below illustrates the end goal:

<Picker Title="Picker title here">
<Picker.ItemsSource>
    <StackLayout Orientation="Horizontal">
        <Label Text="Hello Xamarin.Forms!" />
        <Switch />
    </StackLayout>
    <StackLayout Orientation="Horizontal">
        <Label Text="Hello Xamarin.Forms2!" />
        <Switch />
    </StackLayout>
</Picker.ItemsSource>
</Picker>

Upvotes: 0

Views: 417

Answers (1)

Alessandro Caliaro
Alessandro Caliaro

Reputation: 5768

It's not possible. I think you can create a Popup with a ListView, where you have a ViewCell with all controls you need

Upvotes: 1

Related Questions