xmlns:x="doc.guandang.net; <StackPanel HorizontalAlignment="Left">


<MultiScaleImage x:Name="msi" Width="400" Height="300"></MultiScaleImage> </StackPanel> </UserControl>

MultiScaleImage.xaml.cs

(支持放大/缩小/拖动/滚轮之类的,摘自Deep Zoom Composer生成的代码)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace Silverlight20.Control
{
publicpartialclass MultiScaleImage : UserControl
{
//
// Based on prior work done by Lutz Gerhard, Peter Blois, and Scott Hanselman //
Point lastMousePos = new Point();
double _zoom = 1;
bool mouseButtonPressed = false;
bool mouseIsDragging = false;
Point dragOffset;
Point currentPosition;
publicdouble ZoomFactor
{
get{ return _zoom; }
set{ _zoom = value; }
w 页码,1/13(W) webabcd - 专注于asp.net, html5, silverlight ASP.NET 从现在开始 一切都不晚 博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: ...
扩展GridView控件(5) - 固定指定 行、指定列(30529) 6. [翻译].net 2.0(c#)下简单的FTP 应用程序(29680) 7. 稳扎稳打 Silverlight 2.0 系列文 章索引...
w 页码,1/12(W) webabcd - 专注于asp.net, html5, silverlight ASP.NET 从现在开始 一切都不晚 博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: ...
w 页码,1/12(W) webabcd - 专注于asp.net, html5, silverlight ASP.NET 从现在开始 一切都不晚 博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: ...
热门文档