Add deep zoom folder to VS2010 silverlight applciation
I have copied the deepzoom data 开发者_StackOverflow中文版created folder "Generated Images" into a folder named "temp" in my VS2010 web project, but I am unable to see the "Build" property of this ("temp") folder.
While compilation, VS2010 shows an error "'Build Action' not set to 'Resource'"
The build actions are only applied to files, not folders. You need to set the files to "Content", but why are they not under ClientBin where they would normally reside (and no such settings are required)?
You are basically adding a large number of data files to a website, for the DeepZoom component to download as required. This needs to be relative to the location of the XAP Silverlight application.
As you need to point your MultiScale image control at something it can reference, either put GeneratedImages (back) under ClientBin or change it to a full URL pointing at the location of the dcz_output.xml file (the controlling DeepZoom file).
I just put a deepZoom on my blog here to confirm the parameters needed. In that instance I dropped the whole generated image folder into DeepZoom/GeneratedImages on the site and reference it with path=DeepZoom/GeneratedImages/dzc_output.xml and it worked a treat. So you can put the deep zoom anywhere on a site, but make sure the URL reference matches.
I strongly recommend you never call a folder "temp" unless you are deleting it 5 minutes later :)
精彩评论