I am using the PivotViewer v2 released with Silverlight 5. I've started to use the new data binding ability of the PivotViewer, binding directly to data objects that are passed down from the server, and using an ItemTemplate to display the objects in the PivotViewer.
With CXML, I could pre-generate the DZCs/DZIs for the pivot viewer (it's a JIT collection), but I can't figure out how to use Deep Zoom imaging + the new Pivotviewer with data binding. How can I display a deep zoom image in an item template for a collection that is data bound?
I've tried using the PivotViewerMultiSizeImage class (XAML below) and the PivotViewerMultiScaleSubImageHost class. My example below almost works: it displays an image, but seems to be stuck at the 100 pixel level - no Deep Zoom. I've also tried the MultiScaleImage control with DZIs, but no luck - it generates an OutOfMemory exception immediately.
Does anyone know how to get Deep Zoom capability with data binding in the new PivotViewer?
<pivot:PivotViewer.ItemTemplates>
<pivot:PivotViewerItemTemplate>
<pivot:PivotViewerMultiSizeImage Width="100" Height="100">
<pivot:PivotViewerMultiSizeImage.Sources>
<pivot:PivotViewerMultiSizeImageSource MaxHeight="100" MaxWidth="100" UriSource="{Binding Images[2]}" />
<pivot:PivotViewerMultiSizeImageSource MaxHeight="300" MaxWidth="300" UriSource="{Binding Images[3]}" />
<pivot:PivotViewerMultiSizeImageSource MaxHeight="500" MaxWidth="500" UriSource="{Binding Images[4]}" />
<pivot:PivotViewerMultiSizeImageSource MaxHeight="700" MaxWidth="700" UriSource="{Binding Images[5]}" />
<pivot:PivotViewerMultiSizeImageSource MaxHeight="20000" MaxWidth="20000" UriSource="{Binding Images[6]}" />
</pivot:PivotViewerMultiSizeImage.Sources>
</pivot:PivotViewerMultiSizeImage>
</pivot:PivotViewerItemTemplate>
</pivot:PivotViewer.ItemTemplates>