Table of Contents

Interface IWebBrowserLite

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Subset of the WebBrowser control's methods and properties.

public interface IWebBrowserLite

Properties

AccessToDevToolsEnabled

Enables or disables access to developer tools for the user.

Backend

Gets the current WebBrowser backend.

CanCopy

Gets a value indicating whether the current selection can be copied, which allows the Copy() method to succeed.

CanCut

Gets a value indicating whether the current selection can be cut, which allows the Cut() method to succeed.

CanGoBack

Gets a value indicating whether a previous page in navigation history is available, which allows theGoBack() method to succeed.

CanGoForward

Gets a value indicating whether a subsequent page in navigation history is available, which allows the GoForward() method to succeed.

CanPaste

Gets a value indicating whether the current selection can be replaced with the contents of the Clipboard, which allows the Paste() method to succeed.

CanRedo

Gets a value indicating whether the user can redo the previous operation in the control.

CanUndo

Gets a value indicating whether the user can undo the previous operation in the control.

ContextMenuEnabled

Enables or disables the right click context menu.

Editable

Gets or sets whether the control is currently editable.

HasSelection

Gets a value indicating whether there is a current selection in the control.

IsBusy

Gets a value indicating whether the control is currently busy (e.g. loading a web page).

PageSource

Gets the HTML source code of the currently displayed document or an empty string if no page is currently shown.

PageText

Gets the text of the current page.

PreferredColorScheme

Sets the overall color scheme of the WebBrowser.

SelectedSource

Gets the HTML source code of the currently selected portion of the web page or an empty string if no selection exists.

SelectedText

Gets a value indicating the currently selected text in the control.

UserAgent

Gets or sets the custom user agent string for the WebBrowser control.

Zoom

Gets or sets the zoom level of the page.

ZoomFactor

Gets or sets the zoom factor of the page.

ZoomType

Gets or sets how the zoom factor is currently interpreted by the HTML engine.

Methods

AddScriptMessageHandler(string)

Adds a script message handler with the given name.

AddUserScript(string, bool)

Injects the specified script into the webpage's content.

CanSetZoomType(WebBrowserZoomType)

Retrieve whether the current HTML engine supports a zoom type.

ClearHistory()

Clear the history, this will also remove the visible page.

ClearSelection()

Clears the current selection.

Copy()

Copies the current selection in the control to the Clipboard.

Cut()

Moves the current selection in the control to the Clipboard.

DeleteSelection()

Deletes the current selection.

DoCommand(string, params object?[])

Executes a browser command with the specified name and parameters.

EnableHistory(bool)

Enables or disables the history.

Find(string, WebBrowserFindParams?)

Finds a text on the current page and if found, the control will scroll the text into view and select it.

FindClearResult()

Resets the search and the highlighted results.

GetCurrentTitle()

Get the title of the current web page.

GetCurrentURL()

Get the URL of the currently displayed document.

GetNativeBackend()

Returns pointer to the native backend interface.

GoBack()

Navigates the control to the previous page in the navigation history, if one is available.

GoForward()

Navigates the control to the subsequent page in the navigation history, if one is available.

LoadURL(string)

Loads a web page from a URL.

NavigateToString(string, string?)

Sets the displayed page source to the contents of the given string.

Paste()

Replaces the current selection in the control with the contents of the Clipboard.

Print()

Opens a print dialog so that the user may change the current print and page settings and print the currently displayed page.

Redo()

Redos the last edit operation in the control.

Reload()

Reloads the document currently displayed in the control by downloading for an updated version from the server.

Reload(bool)

Reloads the document currently displayed in the control using the specified refresh option.

RemoveAllUserScripts()

Removes all user scripts from the WebBrowser.

RemoveScriptMessageHandler(string)

Remove a script message handler with the given name that was previously added using AddScriptMessageHandler(string).

RunScriptAsync(string, IntPtr?)

Runs the given JavaScript code asynchronously and returns the result via a ScriptResult event.

SelectAll()

Selects the entire page.

SetVirtualHostNameToFolderMapping(string, string, WebBrowserHostResourceAccessKind)

Sets a mapping between a virtual host name and a folder path to make available to web sites via that host name.

Stop()

Stops the current page loading process, if any. Cancels any pending navigation and stops any dynamic page elements, such as background sounds and animations.

Undo()

Undoes the last edit operation in the control.