0

I'm trying to get a proof-of-concept PivotViewer application up and running, but I can't get the collection to load properly, even in a testing environment. I'm following these instructions:

Building Your First PivotViewer Application

I have a clientaccesspolicy XML file in the root, giving all URIs access. I copied an already existing collection, and have it in the root as well. The collection XML checks out properly.

Whenever I attempt to debug the application, however, it loads but simply displays the URL for the collection, never actually building the PivotViewer.

MainPage.xaml:

<UserControl x:Class="PivotViewer.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Pivot="clr-namespace:System.Windows.Pivot;assembly=System.Windows.Pivot"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">
        <Pivot:PivotViewer x:Name="Pivot" />
    </Grid>
</UserControl>

MainPage.xaml.cs:

namespace PivotViewer
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            Pivot.LoadCollection("http://localhost:55334/Top_Movies.cxml", string.Empty);
        }
    }
}
Brian Bauman
  • 668
  • 5
  • 22

1 Answers1

1

OK, here's a number of ways forward for you.

Firstly, wire up the PivotViewer's CollectionLoadingFailed event before calling the LoadCollection method. This will expose a CollectionErrorEventArgs containing any exceptions.

Secondly, install Fiddler2 and use it to watch what the PivotViewer is requesting. If it's failing to reach certain parts of the pivot collection it will be very obvious.

Let me know what those 2 suggestion bring to light.

Chris Arnold
  • 5,753
  • 5
  • 35
  • 55
  • Fiddler2 did the trick! The problem was that I only had the first collection file - there was a secondary I hadn't copied, as well as all the image files and sort information. I don't need to download all of them, but getting the secondary and the sorting information established the proof of concept perfectly! Thanks for the help, and the great debugging tool! – Brian Bauman Jun 02 '11 at 18:38