Tech Off Thread

3 posts

Question in Windows Phone ToolKit: MultiselectItem with WCF

Back to Forum: Tech Off
  • User profile image
    whiteBox85

     

    I have a question around MultiselectItem control for the Windows Phone Toolkit, I have exposed a SQL server 2008 R2 throw WCF and I want to bind this information to the MultiselectItem control. What I did so far is this:-

     

    <toolkit:MultiselectList Name="multiSelectionList">

       <toolkit:MultiselectList.ItemTemplate>

          <DataTemplate>

             <toolkit:MultiselectItem Content="{Binding Name}" />

          </DataTemplate>

       </toolkit:MultiselectList.ItemTemplate>

    </toolkit:MultiselectList>

     

    So far nothing is showing when I am trying to test it using the Windows Phone emulator, by which it I assume something wrong with the xaml code (I did test the WCF service and it is working).

     Please advise me, thanks.

  • User profile image
    spivonious

    I'm not familiar with that control, but don't you need to bind to the ItemsSource property of the list?

    <toolkit:MultiselectList ItemsSource="{Binding myList}">

  • User profile image
    vesuvius

    @whiteBox85: the multiselect list is an items control, and you bind to it as spivonious has mentioned. If you need to so this in code, there is an example here http://windowsphonegeek.com/articles/Windows-Phone-Toolkit-MultiselectList-in-depth-Part2-Data-Binding

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.