Table of Contents

Class CoreWebView2ContextMenuTarget

Namespace
Microsoft.Web.WebView2.Core
Assembly
Microsoft.Web.WebView2.Core.dll

Represents the information regarding the context menu target. Includes the context selected and the appropriate data used for the actions of a context menu.

public class CoreWebView2ContextMenuTarget
Inheritance
CoreWebView2ContextMenuTarget
Inherited Members

Properties

FrameUri

Gets the uri of the frame. Will match the PageUri if IsRequestedForMainFrame is true.

public string FrameUri { get; }

Property Value

string

HasLinkText

Returns true if the context menu is requested on text element that contains an anchor tag.

public bool HasLinkText { get; }

Property Value

bool

HasLinkUri

Returns true if the context menu is requested on HTML containing an anchor tag.

public bool HasLinkUri { get; }

Property Value

bool

HasSelection

Returns true if the context menu is requested on a selection.

public bool HasSelection { get; }

Property Value

bool

HasSourceUri

Returns true if the context menu is requested on HTML containing a source uri.

public bool HasSourceUri { get; }

Property Value

bool

IsEditable

Returns true if the context menu is requested on an editable component.

public bool IsEditable { get; }

Property Value

bool

IsRequestedForMainFrame

Returns true if the context menu was requested on the main frame and false if invoked on another frame.

public bool IsRequestedForMainFrame { get; }

Property Value

bool

Kind

Gets the kind of context that the user selected as CoreWebView2ContextMenuTargetKind.

public CoreWebView2ContextMenuTargetKind Kind { get; }

Property Value

CoreWebView2ContextMenuTargetKind

LinkText

Gets the text of the link (if HasLinkText is true, null otherwise).

public string LinkText { get; }

Property Value

string

LinkUri

Gets the uri of the link (if HasLinkUri is true, null otherwise).

public string LinkUri { get; }

Property Value

string

PageUri

Gets the uri of the page.

public string PageUri { get; }

Property Value

string

SelectionText

Gets the selected text (if HasSelection is true, null otherwise).

public string SelectionText { get; }

Property Value

string

SourceUri

Gets the active source uri of element (if HasSourceUri is true, null otherwise).

public string SourceUri { get; }

Property Value

string