CoreWebView2Controller.SetBoundsAndZoomFactor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.