0

I am trying to use the list picker control for wp 7 and caliburn micro. I get the binding correct from the model with conventions, but when I press the the picker to see the page to select somethin gelse I get the message

PID:0E2108CA TID:0F790ABE 2012-04-30 18:02:20.7180 View Model not found. Searched: Microsoft.Phone.Controls, Microsoft.Phone.Controls.ListPickerPageViewModel.
PID:0E2108CA TID:0F790ABE 2012-04-30 18:02:20.7210 View Model not found. Searched: Microsoft.Phone.Controls.IListPickerPageViewModel, Microsoft.Phone.Controls.ListPickerPageViewModel.

and it loads a complete blank page (think its the ListPickerPage in the control toolkit)

it doesnt matter if its bound or not, i guess its some convention hooking in that I dont want. To reproduce start a new project, hoock up a viewmodel and view, enter below in in your xaml my xaml looks like this

<toolkit:ListPicker Header="Background" ExpansionMode="FullscreenOnly">
  <sys:String>dark</sys:String>
  <sys:String>light</sys:String>
  <sys:String>dazzle</sys:String>
  <toolkit:ListPicker.FullModeItemTemplate>
    <DataTemplate>
      <StackPanel Orientation="Horizontal" Margin="16 21 0 20">
        <TextBlock Text="{Binding}"
          Margin="0 0 0 0"
          FontSize="43" 
          FontFamily="{StaticResource PhoneFontFamilyLight}"/>
      </StackPanel>
    </DataTemplate>
  </toolkit:ListPicker.FullModeItemTemplate>
</toolkit:ListPicker>

What I would like to happen is ofcourse that the property of my model should popuplate the fullscreen selection, and also it would be nice to set the initial selection based on a property on the model.

Martin Liversage
  • 104,481
  • 22
  • 209
  • 256
cjensen
  • 2,703
  • 1
  • 16
  • 15

1 Answers1

1

Some points I noted:

You have to provide an ItemsSource to the ListPicker - A collection of some sort from which it can display the items. In TextBlock text={Binding } - You have to bind some property, so that it can display.

Rajeev Nair
  • 759
  • 8
  • 20
  • well, for clarity the source is actually embedded here, i ended up using the telerik control, but the case is actually that you need to specify the "fullscreen" template otherwise caliburn will autobind it. – cjensen May 16 '12 at 21:45