Compartilhar via


OnZoom (Silverlight Plug-in Object)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Specifies the handler for a Zoomed event that occurs when the Silverlight plug-in content area receives a host-generated zoom event.

Syntax

object Element

<object ...>
  <param name="onzoom" value="functionname"/>
  ...
</object>

Silverlight.js

Not available.

JavaScript

silverlightObject.Content.OnZoom = handlername;

COM

Not available.

Managed Code

Remarks

The Zoomed event occurs when the Silverlight plug-in receives a zoom input from the host. This is relevant only for hosts that support browser-initiated zooming, such as Internet Explorer 7 and later, Firefox 3, and Safari. Internet Explorer 8 on Windows 7 also supports an auto-zoom mode. For more information, see EnableAutoZoom. Initial loading also raises the Zoomed event in some cases.

Zoom is not relevant for full-screen or out-of-browser.

The Zoomed event does not have specialized event data (for either JavaScript or managed API handling). For managed handling, you can check the value of ZoomFactor, but ZoomFactor is not available for JavaScript handling.

Arguments for an OnZoom Function

sender

object

The Silverlight plug-in that raised the event.

args

Always null.