This project has moved and is read-only. For the latest updates, please go here.

Custom ListPickerPage


I have a scenario where I need a custom list picker page to navigate through hierarchical data.
The ListPicker control has a PickerPageUri property but uses internaly the ListPickerPage class.
So the control doesn't work with a custom list picker page and I had to modify the source of the ListPicker.

It would be nice to have an interface for the list picker page.
I use the following code and it works fine for me:
    public interface IListPickerPage
        object SelectedItem { get; set; }
        System.Collections.IList Items { get; }
        System.Collections.IList SelectedItems { get; }
        System.Windows.FlowDirection FlowDirection { get; set; }
        string HeaderText { get; set; }
        System.Windows.DataTemplate FullModeItemTemplate { get; set; }
        System.Windows.Controls.SelectionMode SelectionMode { get; set; }
In the ListPicker.cs I modified the following lines:
[Line 71]      private IListPickerPage _listPickerPage;
[Line 1319]    _listPickerPage = e.Content as IListPickerPage;
And of course the ListPickerPage has to implement the interface:
    public partial class ListPickerPage : PhoneApplicationPage, IListPickerPage
I hope you can change this so that no modification of the source is required to use a custom list picker page.


Kenrae wrote Mar 13, 2014 at 11:57 AM

I came here to say exactly the same. I hope you can implement this small change. It's weird that it's not done since this approach is already there with DatePickerPage and TimePickerPage.

wrote Mar 13, 2014 at 11:59 AM

wrote Apr 29, 2014 at 9:16 AM

wrote May 5, 2014 at 8:41 AM

wrote May 8, 2014 at 4:30 PM

wrote Dec 1, 2014 at 12:48 PM

wrote Dec 1, 2014 at 6:40 PM

wrote Dec 12, 2015 at 2:26 AM