Search code examples
drop-down-menuwindows-phonewindows-phone-8.1wptoolkit

Dropdownlist with Windows Phone 8.1


I want to create a simple Dropdownlist with for a WP8.1 app. I can't use the Listpicker from the WP Toolkit because it doesn't support WP 8.1 xaml as asked here and here. I don't want to create a Universal App. Is there really no possible way to create a Dropdown List?


Solution

  • You want to use a ComboPicker instead, if you're running WP 8.1 runtime.

    Here's a quick migrating guide: Migrating from the Windows Phone Toolkit ListPicker to the new XAML ComboBox (Display a ListPicker in XAML apps)


    <ComboBox Header="Combo picker" ItemsSource="{Binding Items}">
        <ComboBox.ItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding Name}"/>
            </DataTemplate>
        </ComboBox.ItemTemplate>
    </ComboBox>