2011-06-02 27 views
0

我試圖讓概念驗證PivotViewer應用程序啓動並運行,但即使在測試環境中,我也無法正確加載集合。我下面的這些指示:Silverlight不會加載PivotViewer集合

Building Your First PivotViewer Application

我有一個clientaccesspolicy XML文件中的根,讓所有的URI的訪問。我複製了一個已經存在的集合,並將它放在根中。集合XML正確檢出。

但是,每當我嘗試調試應用程序時,它都會加載,但只是顯示集合的URL,從不實際構建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); 
     } 
    } 
} 

回答

1

OK,這裏有多種方式推進爲您服務。

首先,在調用LoadCollection方法之前,連接PivotViewer的CollectionLoadingFailed事件。這將暴露包含任何異常的CollectionErrorEventArgs。

其次,安裝Fiddler2並使用它來觀察PivotViewer請求的內容。如果它無法達到數據透視表的某些部分,這將非常明顯。

讓我知道那些2建議揭示了什麼。

+0

我會給它一個鏡頭 - 我是新來的Visual Studio,所以它可能需要一段時間... – 2011-06-02 18:16:06

+0

Fiddler2做到了!問題是我只有第一個收集文件 - 有一個我沒有複製過的次要文件,以及所有圖像文件和排序信息。我不需要全部下載它們,但是獲得輔助信息和排序信息是完美的概念證明!感謝您的幫助和偉大的調試工具! – 2011-06-02 18:38:17