Content.ZoomFactor Property

Silverlight

Gets the factor by which the current browser window resizes its contents.

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

public double ZoomFactor { get; }

Property Value

Type: System.Double
The zoom setting for the current browser window.

Some browsers enable users to zoom the displayed content to make it larger or smaller. You can access the zoom setting for the current browser window through the ZoomFactor property.

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 replacing it, handle the Zoomed event and set EnableAutoZoom to true.

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.

Silverlight

Supported in: 5, 4, 3

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

Community Additions

ADD
Show: