Silverlight MultiScaleImage的Source属性

问题描述 投票:1回答:2

我了解到我们应该将.bin文件分配给Silverlight MultiScale Image的Source属性。例如,我从这里学到了(参考匿名方法事件部分中的代码示例),

http://www.soulsolutions.com.au/Blog/tabid/73/EntryId/410/Silverlight-Deep-Zoom-Sample-Code-Part-2.aspx

但我尝试使用Deep Zoom Composor的导出功能永远不会生成.bin文件。这是我的屏幕快照。有什么想法有什么不对?

(我使用的是VSTS 2008 + .Net 3.5 + C#。)

Blend Properties

Folder Contents

c# .net visual-studio-2008 silverlight deepzoom
2个回答
6
投票

MultiScaleImage控件的Source属性可以通过几种不同的方式设置。如果您在XAML中进行设置,则可以直接指向dzc_output.xml文件(位于GeneratedImages文件夹中),如下所示:

<MultiScaleImage x:Name="Foo" Source="/GeneratedImages/dzc_output.xml" />

您也可以在代码中设置它,您需要采取额外的步骤将其指定为DeepZoomImageTileSource:

Foo.Source = new DeepZoomImageTileSource(
             new Uri("/GeneratedImages/dzc_output.xml", UriKind.Relative));

希望有所帮助!


0
投票

GeneratedImages文件夹中有一个名为dzc_output.xml的xml文件,它应该是MultiScaleImage的新终点。

使用新版本的DeepZoomComposer,bin文件格式已替换为此新的xml文件。

© www.soinside.com 2019 - 2024. All rights reserved.