我正在尝试启动并运行一个概念验证PivotViewer应用程序,但我无法正确加载集合,即使在测试环境中也是如此。我正在遵循以下说明:
Building Your First PivotViewer Application
我在根目录中有一个clientaccesspolicy文件,为所有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);
}
}
}发布于 2011-06-03 01:56:13
好的,这里有一些方法可以让你前进。
首先,在调用LoadCollection方法之前连接PivotViewer的CollectionLoadingFailed事件。这将公开一个包含任何异常的CollectionErrorEventArgs。
其次,安装Fiddler2并使用它查看PivotViewer请求的内容。如果它不能到达pivot集合的某些部分,这将是非常明显的。
让我知道这两个建议给我们带来了什么。
https://stackoverflow.com/questions/6217676
复制相似问题