Compartir a través de


CoreWebView2Controller.SetBoundsAndZoomFactor Method

Definition

Overloads

SetBoundsAndZoomFactor(Rectangle, Double)

Updates Bounds and ZoomFactor properties at the same time.

SetBoundsAndZoomFactor(Rect, Double)

SetBoundsAndZoomFactor(Rectangle, Double)

Updates Bounds and ZoomFactor properties at the same time.

public void SetBoundsAndZoomFactor (System.Drawing.Rectangle Bounds, double ZoomFactor);
member this.SetBoundsAndZoomFactor : System.Drawing.Rectangle * double -> unit
Public Sub SetBoundsAndZoomFactor (Bounds As Rectangle, ZoomFactor As Double)

Parameters

Bounds
Rectangle

The bounds to be updated.

ZoomFactor
Double

The zoom factor to be updated.

Remarks

This operation is atomic from the perspective of the host. After returning from this function, the Bounds and ZoomFactor properties are both updated if the function is successful, or neither is updated if the function fails. If Bounds and ZoomFactor are both updated by the same scale (for example, Bounds and ZoomFactor are both doubled), then the page does not display a change in window.innerWidth or window.innerHeight and the WebView renders the content at the new size and zoom without intermediate renderings. This function also updates just one of ZoomFactor or Bounds by passing in the new value for one and the current value for the other.

Applies to

SetBoundsAndZoomFactor(Rect, Double)

public void SetBoundsAndZoomFactor (System.Windows.Rect Bounds, double ZoomFactor);
member this.SetBoundsAndZoomFactor : System.Windows.Rect * double -> unit
Public Sub SetBoundsAndZoomFactor (Bounds As Rect, ZoomFactor As Double)

Parameters

Bounds
Rect
ZoomFactor
Double

Applies to