Content.Zoomed Event

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

Occurs when the zoom setting in the host browser window changes or is initialized.

Namespace:  System.Windows.Interop
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Event Zoomed As EventHandler
public event EventHandler Zoomed

Remarks

Some browsers enable users to zoom the displayed content out or in to make it larger or smaller. By default, Silverlight content automatically resizes in response to changes in the browser zoom setting. You can disable this feature by setting Settings.EnableAutoZoom to false, or replace it by handling the Zoomed event. If you want to supplement the zooming feature instead of replace it, handle the Zoomed event and set EnableAutoZoom to true.

You can access the zoom setting for the current browser window through the ZoomFactor property.

NoteNote:

The browser zoom setting can affect any code that depends on precise sizing or placement of the plug-in within the host Web page. Different browsers respond to zoom settings in different ways. The operating system dots-per-inch (DPI) display setting can also affect the zoom setting. If your application uses custom-sizing logic, be sure to test it on different browsers and with high DPI settings.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.