简体   繁体   中英

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 (ie localhost:64413) and access it through http.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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