Trying to edit SMIL.Client.WPXAP project

Aug 3, 2011 at 4:34 PM

Hi Perf.

I downloaded the code from this project and I am trying to update the SMIL.Client.WPXAP project. I've made some minor modifications with the following goal in mind:

- Fetch default zoom level from SharePoint generic list, instead of last used zoom level.

When I made a minor modification to the LayerPanel.cs file, I was able to rebuild the solution and create a new SMIL.Client.WPXAP.xap file.

When replacing the xap file in the CONTROLTEMPLATES\SMIL\ directory inside the SharePoint 14 hyve, I noticed that the orginal xap file was 917 kb and my own xap file was 626 kb.

After resetting my browser cache, I noticed my own build xap file didn't do anything. The Silverlight control just displayed a big black square. I decided to roll back all the code changes I made and rebuild the solution. After restoring the newly build xap file in the CONTROLTEMPLATES\SMIL directory, the browser still displayed the black silverlight control. So with no code changes, I can't get the Silverlight control to work. If I restore your original xap file (917 kb) things start working again.

Why can't I make modifications to the SMIL.ClientWPXAP.xap file? Am I missing something here?

Thanks in advance for your response.

Bastiaan

Aug 10, 2011 at 3:46 PM

Hi Baskb,

You are probably missing NetTopologySuite and GeoAPI. If you want to customize zoom: remove DeepEarth.BingMapsToolkit.Client.Controls.PersistedState.dll from your project and in your MainPage.xaml remove the reference and use of persisted state object. Then you can simple in your code say map.SetView(new Location(lat, lon), zoom);

Per

Aug 11, 2011 at 9:37 AM

Hi Per. Thanks for your response. I've downloaded the NetTopologySuite and GeoAPI DLL's from http://code.google.com/p/nettopologysuite/

When adding the DLL's as a reference to my SMIL.Client.WPXAP project, I receive an error: "You can't add a reference to GeoAPI.dll (or any other DLL name from NetTopologySuite) as it was not built against the Silverlight runtime. Silverlight projects will only work with Silverlight assemblies."

This is understandable, as standard .NET assemblies may use framework features that are not available in the compact version of the .NET Framework in Silverlight. I've been looking for a Silverlight version of the NTS, but could not find anything like that. Are you able to provide me with a link of the NTS DLL's for Silverlight?

Thanks

Aug 11, 2011 at 10:38 AM

Per. I've changed the extension of your XAP file to ZIP and looked into the content to determine the differences between your XAP and mine.

I've noticed that in my build version the GeoAPI and NTS DLL's were already present. There were a couple of files missing.

  • SMIL.Client.WPXAP.InfoTool.dll
  • System.Reactive.dll
  • System.Windows.Controls.Layout.Toolkit.dll
  • System.Windows.Controls.Toolkit.dll
  • System.Xml.Serialization.dll

I think the DLL's beginning with System belong to the Silverlight Toolkit. After manually adding these files as a reference to my own Visual Studio 2010 Project, things started working!

Problem solved. Thanks for your help!

Aug 11, 2011 at 12:56 PM
Hi BasKb,

Glad you solved the problem. NTS and GeoAPI for Silverlight comes from the DeepEarth project.

Per


From: [email removed]
To: [email removed]
Date: Thu, 11 Aug 2011 01:37:24 -0700
Subject: Re: Trying to edit SMIL.Client.WPXAP project [smil:267602]

From: BasKb
Hi Per. Thanks for your response. I've downloaded the NetTopologySuite and GeoAPI DLL's from http://code.google.com/p/nettopologysuite/
When adding the DLL's as a reference to my SMIL.Client.WPXAP project, I receive an error: "You can't add a reference to GeoAPI.dll (or any other DLL name from NetTopologySuite) as it was not built against the Silverlight runtime. Silverlight projects will only work with Silverlight assemblies."
This is understandable, as standard .NET assemblies may use framework features that are not available in the compact version of the .NET Framework in Silverlight. I've been looking for a Silverlight version of the NTS, but could not find anything like that. Are you able to provide me with a link of the NTS DLL's for Silverlight?
Thanks
Read the full discussion online.
To add a post to this discussion, reply to this email (smil@discussions.codeplex.com)
To start a new discussion for this project, email smil@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com