【问题标题】:Source attribute of Silverlight MultiScaleImageSilverlight MultiScaleImage 的源属性
【发布时间】:2009-07-04 15:36:17
【问题描述】:

我了解到我们应该将 .bin 文件分配给 Siverlight MultiScaleImage 的 Source 属性。比如我从这里学到的(参考Anonymous Methods for Events小节的代码示例),

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#。)

【问题讨论】:

    标签: c# .net visual-studio-2008 silverlight deepzoom


    【解决方案1】:

    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));
    

    希望有帮助!

    【讨论】:

      【解决方案2】:

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

      在新版本的 DeepZoomComposer 中,bin 文件格式已替换为这个新的 xml 文件。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多