CoreWebView2.DefaultDownloadDialogCornerAlignment Property
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.
The default download dialog corner alignment.
public Microsoft.Web.WebView2.Core.CoreWebView2DefaultDownloadDialogCornerAlignment DefaultDownloadDialogCornerAlignment { get; set; }
member this.DefaultDownloadDialogCornerAlignment : Microsoft.Web.WebView2.Core.CoreWebView2DefaultDownloadDialogCornerAlignment with get, set
Public Property DefaultDownloadDialogCornerAlignment As CoreWebView2DefaultDownloadDialogCornerAlignment
Property Value
Examples
const int defaultMarginX = 75, defaultMarginY = 0;
CoreWebView2DefaultDownloadDialogCornerAlignment cornerAlignment
= CoreWebView2DefaultDownloadDialogCornerAlignment.TopLeft;
System.Drawing.Point margin = new System.Drawing.Point(
defaultMarginX, defaultMarginY);
webView.CoreWebView2.DefaultDownloadDialogCornerAlignment =
cornerAlignment;
webView.CoreWebView2.DefaultDownloadDialogMargin = margin;
Remarks
The dialog can be aligned to any of the WebView corners (see CoreWebView2DefaultDownloadDialogCornerAlignment). When the WebView or dialog changes size, the dialog keeps it position relative to the corner. The dialog may become partially or completely outside of the WebView bounds if the WebView is small enough. Set the margin from the corner with the DefaultDownloadDialogMargin property. The corner alignment and margin should be set during initialization to ensure that they are correctly applied when the layout is first computed, otherwise they will not take effect until the next time the WebView position or size is updated.