Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
XML
Hi,

I've come across an issue with the Panorama Control on Windows Phone 8.

I'm binding to an Observable Collection using INotifyPropertyChanged interface (MVVM).

<phone:PhoneApplicationPage

...

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">

         <!--Panorama control-->
        <phone:Panorama ItemsSource="{Binding PageTitles}"
                        Title="Panorama Test">
            <phone:Panorama.HeaderTemplate>
                <DataTemplate>
                    <Grid Width="410" Margin="-2,0,0,0">
                        <TextBlock d:DataContext="{Binding}" Text="{Binding Title}" HorizontalAlignment="Left" Style="{StaticResource PanoramaItemHeaderTextStyle}" />
                    </Grid>
                </DataTemplate>
            </phone:Panorama.HeaderTemplate>
            <phone:Panorama.Background>
                <ImageBrush ImageSource="/Assets\PanoramaBackground.png"/>
            </phone:Panorama.Background>

            <phone:PanoramaItem Name="Screen1">
                <Grid Margin="0,-6,0,12">
                    <Border BorderThickness="1" Width="420" Height="500" BorderBrush="#FFFFC700" Background="#FFFFC700"/>
                </Grid>
            </phone:PanoramaItem>
            <phone:PanoramaItem Name="Screen2">
                <Grid Margin="0,-6,0,12">
                    <Border BorderThickness="1" Width="420" Height="500" BorderBrush="#FFFFC700" Background="#FFFFC700"/>
                </Grid>
            </phone:PanoramaItem>
            <phone:PanoramaItem Name="Screen3">
                <Grid Margin="0,-6,0,12">
                    <Border BorderThickness="1" Width="420" Height="500" BorderBrush="#FFFFC700" Background="#FFFFC700"/>
                </Grid>
            </phone:PanoramaItem>
            <phone:PanoramaItem Name="Screen4" >
                <Grid Margin="0,-6,0,12">
                    <Border BorderThickness="1" Width="420" Height="500" BorderBrush="#FFFFC700" Background="#FFFFC700"/>
                </Grid>
            </phone:PanoramaItem>
        </phone:Panorama>
    </Grid>
</phone:PhoneApplicationPage>

When in the Visual Studio 2013 Design View, in place of the page content I see I single line that reads:

_.di28.Induction.Viewmodels.ItemViewModel

and when run in the Emulator, it reads:

Induction.Viewmodels.ItemViewModel

I've restructured the Binding in all the ways I can think of and find, but the problem remains.

Is this a fault with the Panorama Control on Windows Phone 8?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900