MVVM, Windows Phone 7

Data Binding Panorama Control WP7 MVVM

by Peter Daukintis

Ok, this is just a quick follow-up to a previous post Data Binding Pivot Control just as confirmation that this approach will work for the WP7 Panorama Control as well. Starting with the project from the previous post, I literally opened the xaml and changed the word ‘pivot’ to ‘panorama’ to end with this:

        <controls:Panorama ItemsSource="{Binding PageCollection}"
                        Title="MY APPLICATION"
                    <Grid x:Name="grid">
                        <TextBlock TextWrapping="Wrap"
                                   Text="{Binding TitleText}"
                                   d:LayoutOverrides="Width, Height" />
                    <WindowsPhonePivotApplication1:DataTemplateSelector Content="{Binding}" />

and that was it!



Technorati Tags: ,,,,,,,,,,,,,,,,,,,,,,,,,,

Windows Live Tags: Data,Panorama,Control,MVVM,Beta,Pivot,confirmation,ItemsSource,PageCollection,Title,APPLICATION,HorizontalContentAlignment,Stretch,VerticalContentAlignment,HeaderTemplate,DataTemplate,Grid,Name,TextBlock,Wrap,Text,TitleText,LayoutOverrides,Width,ItemTemplate,DataTemplateSelector,Content

5 thoughts on “Data Binding Panorama Control WP7 MVVM

  1. Hi, could you suggest me: how can I set diffeternt Orientation to generated Panorama Item? I need to have different dataTemplates, so I use your nice trick, but also some of my PanoramaItems must be horisontal oriented.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.