Deep Zoom 的 Silverlight 展示控件 MultiScaleImage

MultiScaleImage 控件是Silverlight中展示 DeepZoom的专属控件

1.将导出的DeepZoom资源复制到VisualStudio 项目宿主的ClientBin文件夹

2.建立一个放有MultiScaleImage 控件的页面设置如下代码

<!--使1用?Silverlight 内ú置?的?DeepZoom控?件t-->

            <MultiScaleImage Name="deepzoomImage"

                             Source="/GeneratedImages/dzc_output.xml"

                             MouseLeave="MultiScaleImage_MouseLeave"  

                             MouseEnter="MultiScaleImage_MouseEnter"/>

后台代码:

private void MultiScaleImage_MouseEnter(object sender

            , MouseEventArgs e)

        {

            if (deepzoomImage.UseSprings == false)

            {

                deepzoomImage.UseSprings = true;

            }

            //放?大ó图?片?

            deepzoomImage.ZoomAboutLogicalPoint(3, 0.3, 0.3);

        }

        private void MultiScaleImage_MouseLeave(object sender

            , MouseEventArgs e)

        {

            //恢?复′原-始?大ó小?

            deepzoomImage.ZoomAboutLogicalPoint(0.3, 0.3, 0.3);

        }

 

 

未完成!缺少图片

你可能感兴趣的:(silverlight)