I'm using a panorama control in my wp8 app that consists of 4 panorama-items. These items are all i separate files. The content within the items are bound to viewmodels, (using MVVM Cross).
The problem is when I navigate from a panorama-item to a new page and go back, the panorama control shows the first panorama-item (it kinda resets).
I've tried to override OnNavigatedTo
using the selectedIndex
on the panorama control, but it only returns -1
.
The xaml class containing the panorama-control:
<Grid x:Name="LayoutRoot" Background="Transparent">
<!--Panorama Control-->
<!--Cannot bind directly to background with ImageBrush, using converter instead-->
<controls:Panorama x:Name="panorama"
Background="{Binding Home.WindowsBackgroundUrl, Converter={StaticResource ImageBrushConverter}}">
<controls:Panorama.Title>
<StackPanel Orientation="Vertical" Margin="0,60,0,0">
<Image x:Name="Icon" Source="/Images/PanoramaLogo.png" />
</StackPanel>
</controls:Panorama.Title>
<!--Panorama items-->
<ScrollViewer>
<local:InterestView x:Name="Interest" Margin="0,-20,0,0" />
</ScrollViewer>
<ScrollViewer>
<local:CustomerCategoryPanoramaItem x:Name="Customer" Margin="0,-20,0,0"/>
</ScrollViewer>
<ScrollViewer>
<local:MapListView x:Name="MapList" Margin="0,-20,0,0"/>
</ScrollViewer>
<ScrollViewer>
<local:ContactMeView Margin="0,-20,0,0"/>
</ScrollViewer>
</controls:Panorama>
</Grid>
Thanks for any help