//Deep Zoom 全屏后滚轮失效的 修改代码
代码
public Page()
{
InitializeComponent();
// 因为DeepZoom默认生成的那个是以JavaScript方式调用的鼠标滚轮,全屏模式下不支持javascript就不行了,如果你用Silverlight 3可以手动修改一下Page_Load改
this.msi.MouseWheel += new MouseWheelEventHandler(msi_MouseWheel);
}
// 再改下面这个函数
void msi_MouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
{
double newzoom = zoom;
if (e.Delta < 0)
newzoom /= 1.3;
else
newzoom *= 1.3;
Zoom(newzoom, msi.ElementToLogicalPoint(this.lastMousePos));
msi.CaptureMouse();
}
//带的那个Wheel.cs就可以删除了,这样DeepZoom在全屏也就支持滚轮了
{
InitializeComponent();
// 因为DeepZoom默认生成的那个是以JavaScript方式调用的鼠标滚轮,全屏模式下不支持javascript就不行了,如果你用Silverlight 3可以手动修改一下Page_Load改
this.msi.MouseWheel += new MouseWheelEventHandler(msi_MouseWheel);
}
// 再改下面这个函数
void msi_MouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
{
double newzoom = zoom;
if (e.Delta < 0)
newzoom /= 1.3;
else
newzoom *= 1.3;
Zoom(newzoom, msi.ElementToLogicalPoint(this.lastMousePos));
msi.CaptureMouse();
}
//带的那个Wheel.cs就可以删除了,这样DeepZoom在全屏也就支持滚轮了