DotNetBrowser  1.14
Public Member Functions | Properties | List of all members
DotNetBrowser.BrowserView Interface Reference

A view that displays web pages. BrowserView handles mouse and keyboard events, and manages scrolling automatically. More...

Inherits IDisposable.

Inherited by DotNetBrowser.WinForms.WinFormsBrowserView, and DotNetBrowser.WPF.WPFBrowserView.

Public Member Functions

UIComponent GetComponent ()
 Returns a lightweight ui component with embedded web browser control that displays web pages. This component can be used in applications as standard component. More...
 
Image GetImage ()
 Returns an image of the currently loaded web page. The image size will be equal to the size of the BrowserView. More...
 
void UpdateSize (int width, int height)
 Updates the size of BrowserView to the required width and height. Avoid using this method when the BrowserView is embedded into UI container and displayed. This method should be used in headless mode, when you don't display this view, but you need to update its size. More...
 
void SetKeyFilter (KeyFilter keyFilter)
 Sets key filter that can be used to filter key events sent to Browser view. By default BrowserView doesn't have key filter, so all key events are sent to web browser control. More...
 
double GetDeviceScaleFactor ()
 Returns device scale factor associated with the current view. For standard-resolution displays, the scale factor is 1.0 and one point equals one pixel. For Retina displays, the scale factor is 2.0 and one point is represented by four pixels. Use scale factor to scale image received via the BrowserView.GetImage() method. More...
 

Properties

Browser Browser [get]
 Returns Browser instance associated with the current container. More...
 
bool IsDisposed [get]
 Gets a value indicating whether the current view has been disposed of. More...
 
IInputSimulator InputSimulator [get]
 Returns input simulation controller instance. More...
 
IBackForwardNavigator BackForwardNavigator [get]
 Returns back-forward navigation controller instance. More...
 
bool Focused [set]
 Sets focus or unfocus to the current view. Unfocus available only for BrowserType.HEAVYWEIGHT view. More...
 

Detailed Description

A view that displays web pages. BrowserView handles mouse and keyboard events, and manages scrolling automatically.

Member Function Documentation

UIComponent DotNetBrowser.BrowserView.GetComponent ( )

Returns a lightweight ui component with embedded web browser control that displays web pages. This component can be used in applications as standard component.

Returns
component for embedding into applications.

Implemented in DotNetBrowser.WinForms.WinFormsBrowserView, and DotNetBrowser.WPF.WPFBrowserView.

double DotNetBrowser.BrowserView.GetDeviceScaleFactor ( )

Returns device scale factor associated with the current view. For standard-resolution displays, the scale factor is 1.0 and one point equals one pixel. For Retina displays, the scale factor is 2.0 and one point is represented by four pixels. Use scale factor to scale image received via the BrowserView.GetImage() method.

Returns
the device scale factor associated with the current view. For standard-resolution displays, it will be 1.0. For Retina displays - 2.0.

Implemented in DotNetBrowser.WinForms.WinFormsBrowserView, and DotNetBrowser.WPF.WPFBrowserView.

Image DotNetBrowser.BrowserView.GetImage ( )

Returns an image of the currently loaded web page. The image size will be equal to the size of the BrowserView.

Returns
an image of the currently loaded web page.

Implemented in DotNetBrowser.WinForms.WinFormsBrowserView, and DotNetBrowser.WPF.WPFBrowserView.

void DotNetBrowser.BrowserView.SetKeyFilter ( KeyFilter  keyFilter)

Sets key filter that can be used to filter key events sent to Browser view. By default BrowserView doesn't have key filter, so all key events are sent to web browser control.

Parameters
keyFilterthe new key filter.

Implemented in DotNetBrowser.WinForms.WinFormsBrowserView, and DotNetBrowser.WPF.WPFBrowserView.

void DotNetBrowser.BrowserView.UpdateSize ( int  width,
int  height 
)

Updates the size of BrowserView to the required width and height. Avoid using this method when the BrowserView is embedded into UI container and displayed. This method should be used in headless mode, when you don't display this view, but you need to update its size.

Parameters
widththe new width of the view in pixels.
heightthe new height of the view in pixels.

Implemented in DotNetBrowser.WinForms.WinFormsBrowserView, and DotNetBrowser.WPF.WPFBrowserView.

Property Documentation

IBackForwardNavigator DotNetBrowser.BrowserView.BackForwardNavigator
get

Returns back-forward navigation controller instance.

Browser DotNetBrowser.BrowserView.Browser
get

Returns Browser instance associated with the current container.

Returns
the browser instance
bool DotNetBrowser.BrowserView.Focused
set

Sets focus or unfocus to the current view. Unfocus available only for BrowserType.HEAVYWEIGHT view.

IInputSimulator DotNetBrowser.BrowserView.InputSimulator
get

Returns input simulation controller instance.

bool DotNetBrowser.BrowserView.IsDisposed
get

Gets a value indicating whether the current view has been disposed of.