当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - My PivotViewer isn't displaying any information

问题描述:

I'm trying to learn how to use the PivotViewer control for Silverlight. I used the excel tool to create a collection and I output the files to a folder called '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:

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. You have to put the xml file on your web server (i.e. localhost:64413) and access it through http.

分享给朋友:
您可能感兴趣的文章:
随机阅读: