简体   繁体   English

我的PivotViewer没有显示任何信息

[英]My PivotViewer isn't displaying any information

I'm trying to learn how to use the PivotViewer control for Silverlight. 我正在尝试学习如何对Silverlight使用PivotViewer控件。 I used the excel tool to create a collection and I output the files to a folder called 'asdf'. 我使用excel工具创建了一个集合,然后将文件输出到名为“ asdf”的文件夹中。 Then I copied this folder with all of it's contents to the D: partition and here is the code I use to call the collection: 然后,我将此文件夹及其所有内容复制到D:分区,这是我用来调用集合的代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace PivotTest
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            Pivot.LoadCollection(@"D:\asdf\my.cxml", string.Empty);            
        }
    }
}

Here's a screenshot of what's inside the folder and what I get in the browser when running the application. 这是该文件夹中的内容以及运行该应用程序时在浏览器中得到的内容的屏幕截图。 替代文字

替代文字

Any suggestions on what I'm doing wrong? 关于我在做什么错的任何建议吗? Thanks for the help! 谢谢您的帮助!

My guess is that the PivotViewer is not allowed to access the xml file on your local drive. 我的猜测是不允许PivotViewer访问本地驱动器上的xml文件。 You have to put the xml file on your web server (ie localhost:64413) and access it through http. 您必须将xml文件放在Web服务器上(即localhost:64413)并通过http访问它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM