首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Silverlight无法加载PivotViewer集合

Silverlight无法加载PivotViewer集合
EN

Stack Overflow用户
提问于 2011-06-03 01:01:38
回答 1查看 1.1K关注 0票数 0

我正在尝试启动并运行一个概念验证PivotViewer应用程序,但我无法正确加载集合,即使在测试环境中也是如此。我正在遵循以下说明:

Building Your First PivotViewer Application

我在根目录中有一个clientaccesspolicy文件,为所有URI提供访问权限。我复制了一个已经存在的集合,并将其放在根目录中。集合XML已正确签出。

但是,每当我尝试调试应用程序时,它加载的只是显示集合的URL,而不是实际构建PivotViewer。

MainPage.xaml:

代码语言:javascript
运行
复制
<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:

代码语言:javascript
运行
复制
namespace PivotViewer
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            Pivot.LoadCollection("http://localhost:55334/Top_Movies.cxml", string.Empty);
        }
    }
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-06-03 01:56:13

好的,这里有一些方法可以让你前进。

首先,在调用LoadCollection方法之前连接PivotViewer的CollectionLoadingFailed事件。这将公开一个包含任何异常的CollectionErrorEventArgs。

其次,安装Fiddler2并使用它查看PivotViewer请求的内容。如果它不能到达pivot集合的某些部分,这将是非常明显的。

让我知道这两个建议给我们带来了什么。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6217676

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档