C# 클래스 CefSharp.Wpf.ChromiumWebBrowser

상속: System.Windows.Controls.ContentControl, IRenderWebBrowser, IWpfWebBrowser
파일 보기 프로젝트 열기: cefsharp/CefSharp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
AddressProperty System.Windows.DependencyProperty
CanGoBackProperty System.Windows.DependencyProperty
CanGoForwardProperty System.Windows.DependencyProperty
CleanupElementProperty System.Windows.DependencyProperty
IsBrowserInitializedProperty System.Windows.DependencyProperty
IsLoadingProperty System.Windows.DependencyProperty
TitleProperty System.Windows.DependencyProperty
TooltipTextProperty System.Windows.DependencyProperty
WebBrowserProperty System.Windows.DependencyProperty
ZoomLevelIncrementProperty System.Windows.DependencyProperty
ZoomLevelProperty System.Windows.DependencyProperty

Private Properties

프로퍼티 타입 설명
ChromiumWebBrowser System
CreateImage Image
CreatePopup System.Windows.Controls.Primitives.Popup
GetDragEffects DragDropEffects
GetDragOperationsMask DragOperationsMask
GetMouseEvent MouseEvent
IRenderWebBrowser CefSharp.Internals.BitmapInfo
IRenderWebBrowser CefSharp.Internals.ScreenInfo
IRenderWebBrowser CefSharp.Internals.ViewRect
IRenderWebBrowser bool
IRenderWebBrowser void
IRenderWebBrowser void
IRenderWebBrowser void
IRenderWebBrowser void
IRenderWebBrowser void
IRenderWebBrowser void
IWebBrowserInternal void
IWebBrowserInternal void
IWebBrowserInternal void
IWebBrowserInternal void
IWebBrowserInternal void
IWebBrowserInternal void
IWebBrowserInternal void
IWebBrowserInternal void
IWebBrowserInternal void
IWebBrowserInternal void
OnActualSizeChanged void
OnAddressChanged void
OnApplicationExit void
OnCleanupElementChanged void
OnCleanupElementUnloaded void
OnDragEnter void
OnDragLeave void
OnDragOver void
OnDrop void
OnGotKeyboardFocus void
OnIsBrowserInitializedChanged void
OnIsVisibleChanged void
OnLoaded void
OnLostKeyboardFocus void
OnMouseButton void
OnPreviewKey void
OnTitleChanged void
OnTooltipClosed void
OnTooltipTextChanged void
OnTooltipTimerTick void
OnZoomLevelChanged void
PopupMouseEnter void
PopupMouseLeave void
PresentationSourceChangedHandler void
RemoveSourceHook void
SetPopupSizeAndPositionImpl void
UiThreadRunAsync void
UiThreadRunSync void
UpdateTooltip void
ZoomIn void
ZoomOut void
ZoomReset void

공개 메소드들

메소드 설명
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetBrowser ( ) : IBrowser

Returns the current IBrowser Instance

Load ( string url ) : void

Loads the specified URL.

OnApplyTemplate ( ) : void

When overridden in a derived class, is invoked whenever application code or internal processes call M:System.Windows.FrameworkElement.ApplyTemplate.

RegisterAsyncJsObject ( string name, object objectToBind, BindingOptions options = null ) : void

Asynchronously registers a Javascript object in this specific browser instance.

Only methods of the object will be availabe.

The registered methods can only be called in an async way, they will all return immeditaly and the resulting object will be a standard javascript Promise object which is usable to wait for completion or failure.

RegisterJsObject ( string name, object objectToBind, BindingOptions options = null ) : void

Registers a Javascript object in this specific browser instance.

보호된 메소드들

메소드 설명
CreateOffscreenBrowser ( Size size ) : bool

Create the underlying Browser instance, can be overriden to defer control creation The browser will only be created when size > Size(0,0). If you specify a positive size then the browser will be created, if the ActualWidth and ActualHeight properties are in reality still 0 then you'll likely end up with a browser that won't render.

Dispose ( bool isDisposing ) : void

Releases unmanaged and - optionally - managed resources.

OnAddressChanged ( string oldValue, string newValue ) : void

Called when [address changed].

OnCleanupElementChanged ( FrameworkElement oldValue, FrameworkElement newValue ) : void

Called when [cleanup element changed].

OnIsBrowserInitializedChanged ( bool oldValue, bool newValue ) : void

Called when [is browser initialized changed].

OnMouseDown ( System.Windows.Input.MouseButtonEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnMouseLeave ( System.Windows.Input.MouseEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.

OnMouseMove ( System.Windows.Input.MouseEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnMouseUp ( System.Windows.Input.MouseButtonEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnMouseWheel ( System.Windows.Input.MouseWheelEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnPreviewKeyUp ( System.Windows.Input.KeyEventArgs e ) : void

Invoked when an unhandled E:System.Windows.Input.Keyboard.PreviewKeyUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnRendering ( object sender, WpfBitmapInfo bitmapInfo ) : void

Raises Rendering event

OnZoomLevelChanged ( double oldValue, double newValue ) : void

Called when [zoom level changed].

SourceHook ( IntPtr hWnd, int message, IntPtr wParam, IntPtr lParam, bool &handled ) : IntPtr

WindowProc callback interceptor. Handles Windows messages intended for the source hWnd, and passes them to the contained browser as needed.

비공개 메소드들

메소드 설명
ChromiumWebBrowser ( ) : System

Initializes static members of the ChromiumWebBrowser class.

CreateImage ( ) : Image

Creates the image.

CreatePopup ( ) : System.Windows.Controls.Primitives.Popup

Creates the popup.

GetDragEffects ( DragOperationsMask mask ) : DragDropEffects

Gets the drag effects.

GetDragOperationsMask ( DragDropEffects dragDropEffects ) : DragOperationsMask

Converts .NET drag drop effects to CEF Drag Operations

GetMouseEvent ( System.Windows.DragEventArgs e ) : MouseEvent

Converts a .NET Drag event to a CefSharp MouseEvent

IRenderWebBrowser ( bool isPopup ) : CefSharp.Internals.BitmapInfo

Creates the bitmap information.

IRenderWebBrowser ( ) : CefSharp.Internals.ScreenInfo

Gets the screen information.

IRenderWebBrowser ( ) : CefSharp.Internals.ViewRect

Gets the view rect.

IRenderWebBrowser ( IDragData dragData, DragOperationsMask mask, int x, int y ) : bool

Starts the dragging.

IRenderWebBrowser ( CefSharp.Internals.BitmapInfo bitmapInfo ) : void

Invokes the render asynchronous.

IRenderWebBrowser ( DragOperationsMask operation ) : void
IRenderWebBrowser ( IntPtr handle, CefCursorType type ) : void

Sets the cursor.

IRenderWebBrowser ( Range selectedRange, Rect characterBounds ) : void
IRenderWebBrowser ( bool isOpen ) : void

Sets the popup is open.

IRenderWebBrowser ( int width, int height, int x, int y ) : void

Sets the popup size and position.

IWebBrowserInternal ( AddressChangedEventArgs args ) : void

Sets the address.

IWebBrowserInternal ( ConsoleMessageEventArgs args ) : void

Handles the E:ConsoleMessage event.

IWebBrowserInternal ( FrameLoadEndEventArgs args ) : void

Handles the E:FrameLoadEnd event.

IWebBrowserInternal ( FrameLoadStartEventArgs args ) : void

Handles the E:FrameLoadStart event.

IWebBrowserInternal ( IBrowser browser ) : void

Called when [after browser created].

IWebBrowserInternal ( LoadErrorEventArgs args ) : void

Handles the E:LoadError event.

IWebBrowserInternal ( LoadingStateChangedEventArgs args ) : void

Sets the loading state change.

IWebBrowserInternal ( StatusMessageEventArgs args ) : void

Handles the E:StatusMessage event.

IWebBrowserInternal ( TitleChangedEventArgs args ) : void

Sets the title.

IWebBrowserInternal ( string tooltipText ) : void

Sets the tooltip text.

OnActualSizeChanged ( object sender, System.Windows.SizeChangedEventArgs e ) : void

Handles the E:ActualSizeChanged event.

OnAddressChanged ( DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs args ) : void

Handles the E:AddressChanged event.

OnApplicationExit ( object sender, System.Windows.ExitEventArgs e ) : void

Handles the E:ApplicationExit event.

OnCleanupElementChanged ( DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs args ) : void

Handles the E:CleanupElementChanged event.

OnCleanupElementUnloaded ( object sender, RoutedEventArgs e ) : void

Handles the E:CleanupElementUnloaded event.

OnDragEnter ( object sender, System.Windows.DragEventArgs e ) : void

Handles the E:DragEnter event.

OnDragLeave ( object sender, System.Windows.DragEventArgs e ) : void

Handles the E:DragLeave event.

OnDragOver ( object sender, System.Windows.DragEventArgs e ) : void

Handles the E:DragOver event.

OnDrop ( object sender, System.Windows.DragEventArgs e ) : void

Handles the E:Drop event.

OnGotKeyboardFocus ( object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void

Handles the E:GotKeyboardFocus event.

OnIsBrowserInitializedChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles the E:IsBrowserInitializedChanged event.

OnIsVisibleChanged ( object sender, System.Windows.DependencyPropertyChangedEventArgs args ) : void

Handles the E:IsVisibleChanged event.

OnLoaded ( object sender, RoutedEventArgs routedEventArgs ) : void

Handles the E:Loaded event.

OnLostKeyboardFocus ( object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void

Handles the E:LostKeyboardFocus event.

OnMouseButton ( System.Windows.Input.MouseButtonEventArgs e ) : void

Handles the E:MouseButton event.

OnPreviewKey ( System.Windows.Input.KeyEventArgs e ) : void

Handles the E:PreviewKey event.

OnTitleChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles the E:TitleChanged event.

OnTooltipClosed ( object sender, RoutedEventArgs e ) : void

Handles the E:TooltipClosed event.

OnTooltipTextChanged ( ) : void

Called when [tooltip text changed].

OnTooltipTimerTick ( object sender, EventArgs e ) : void

Handles the E:TooltipTimerTick event.

OnZoomLevelChanged ( DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs args ) : void

Handles the E:ZoomLevelChanged event.

PopupMouseEnter ( object sender, System.Windows.Input.MouseEventArgs e ) : void

Handle the mouse cursor entering the pop-up.

PopupMouseLeave ( object sender, System.Windows.Input.MouseEventArgs e ) : void

Handle the mouse cursor exiting the pop-up.

PresentationSourceChangedHandler ( object sender, System.Windows.SourceChangedEventArgs args ) : void

PresentationSource changed handler.

RemoveSourceHook ( ) : void

Removes the source hook.

SetPopupSizeAndPositionImpl ( int width, int height, int x, int y ) : void

Sets the popup size and position implementation.

UiThreadRunAsync ( System.Action action, DispatcherPriority priority = DispatcherPriority.DataBind ) : void

Runs the specific Action on the Dispatcher in an async fashion

UiThreadRunSync ( System.Action action, DispatcherPriority priority = DispatcherPriority.DataBind ) : void

Runs the specific Action on the Dispatcher in an sync fashion

UpdateTooltip ( string text ) : void

Updates the tooltip.

ZoomIn ( ) : void

Zooms the browser in.

ZoomOut ( ) : void

Zooms the browser out.

ZoomReset ( ) : void

Reset the browser's zoom level to default.

메소드 상세

CreateOffscreenBrowser() 보호된 메소드

Create the underlying Browser instance, can be overriden to defer control creation The browser will only be created when size > Size(0,0). If you specify a positive size then the browser will be created, if the ActualWidth and ActualHeight properties are in reality still 0 then you'll likely end up with a browser that won't render.
protected CreateOffscreenBrowser ( Size size ) : bool
size System.Windows.Size size of the current control, must be greater than Size(0, 0)
리턴 bool

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool isDisposing ) : void
isDisposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

GetBrowser() 공개 메소드

Returns the current IBrowser Instance
public GetBrowser ( ) : IBrowser
리턴 IBrowser

Load() 공개 메소드

Loads the specified URL.
public Load ( string url ) : void
url string The URL to be loaded.
리턴 void

OnAddressChanged() 보호된 메소드

Called when [address changed].
protected OnAddressChanged ( string oldValue, string newValue ) : void
oldValue string The old value.
newValue string The new value.
리턴 void

OnApplyTemplate() 공개 메소드

When overridden in a derived class, is invoked whenever application code or internal processes call M:System.Windows.FrameworkElement.ApplyTemplate.
public OnApplyTemplate ( ) : void
리턴 void

OnCleanupElementChanged() 보호된 메소드

Called when [cleanup element changed].
protected OnCleanupElementChanged ( FrameworkElement oldValue, FrameworkElement newValue ) : void
oldValue System.Windows.FrameworkElement The old value.
newValue System.Windows.FrameworkElement The new value.
리턴 void

OnIsBrowserInitializedChanged() 보호된 메소드

Called when [is browser initialized changed].
protected OnIsBrowserInitializedChanged ( bool oldValue, bool newValue ) : void
oldValue bool if set to true [old value].
newValue bool if set to true [new value].
리턴 void

OnMouseDown() 보호된 메소드

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnMouseDown ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs The that contains the event data. /// This event data reports details about the mouse button that was pressed and the handled state.
리턴 void

OnMouseLeave() 보호된 메소드

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.
protected OnMouseLeave ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs The that contains the event data.
리턴 void

OnMouseMove() 보호된 메소드

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnMouseMove ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs The that contains the event data.
리턴 void

OnMouseUp() 보호된 메소드

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnMouseUp ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs The that contains the event data. The event data reports that the mouse button was released.
리턴 void

OnMouseWheel() 보호된 메소드

Invoked when an unhandled E:System.Windows.Input.Mouse.MouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnMouseWheel ( System.Windows.Input.MouseWheelEventArgs e ) : void
e System.Windows.Input.MouseWheelEventArgs The that contains the event data.
리턴 void

OnPreviewKeyDown() 보호된 메소드

Invoked when an unhandled E:System.Windows.Input.Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnPreviewKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs The that contains the event data.
리턴 void

OnPreviewKeyUp() 보호된 메소드

Invoked when an unhandled E:System.Windows.Input.Keyboard.PreviewKeyUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnPreviewKeyUp ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs The that contains the event data.
리턴 void

OnRendering() 보호된 메소드

Raises Rendering event
protected OnRendering ( object sender, WpfBitmapInfo bitmapInfo ) : void
sender object The sender.
bitmapInfo WpfBitmapInfo The bitmap information.
리턴 void

OnZoomLevelChanged() 보호된 메소드

Called when [zoom level changed].
protected OnZoomLevelChanged ( double oldValue, double newValue ) : void
oldValue double The old value.
newValue double The new value.
리턴 void

RegisterAsyncJsObject() 공개 메소드

Asynchronously registers a Javascript object in this specific browser instance.

Only methods of the object will be availabe.

The registered methods can only be called in an async way, they will all return immeditaly and the resulting object will be a standard javascript Promise object which is usable to wait for completion or failure.
Browser is already initialized. RegisterJsObject must be + /// called before the underlying CEF browser is created.
public RegisterAsyncJsObject ( string name, object objectToBind, BindingOptions options = null ) : void
name string The name of the object. (e.g. "foo", if you want the object to be accessible as window.foo).
objectToBind object The object to be made accessible to Javascript.
options BindingOptions binding options - camelCaseJavascriptNames default to true
리턴 void

RegisterJsObject() 공개 메소드

Registers a Javascript object in this specific browser instance.
Browser is already initialized. RegisterJsObject must be + /// called before the underlying CEF browser is created.
public RegisterJsObject ( string name, object objectToBind, BindingOptions options = null ) : void
name string The name of the object. (e.g. "foo", if you want the object to be accessible as window.foo).
objectToBind object The object to be made accessible to Javascript.
options BindingOptions binding options - camelCaseJavascriptNames default to true
리턴 void

SourceHook() 보호된 메소드

WindowProc callback interceptor. Handles Windows messages intended for the source hWnd, and passes them to the contained browser as needed.
protected SourceHook ( IntPtr hWnd, int message, IntPtr wParam, IntPtr lParam, bool &handled ) : IntPtr
hWnd System.IntPtr The source handle.
message int The message.
wParam System.IntPtr Additional message info.
lParam System.IntPtr Even more message info.
handled bool if set to true, the event has already been handled by someone else.
리턴 System.IntPtr

프로퍼티 상세

AddressProperty 공개적으로 정적으로 프로퍼티

The address property
public static DependencyProperty,System.Windows AddressProperty
리턴 System.Windows.DependencyProperty

CanGoBackProperty 공개적으로 정적으로 프로퍼티

The can go back property
public static DependencyProperty,System.Windows CanGoBackProperty
리턴 System.Windows.DependencyProperty

CanGoForwardProperty 공개적으로 정적으로 프로퍼티

The can go forward property
public static DependencyProperty,System.Windows CanGoForwardProperty
리턴 System.Windows.DependencyProperty

CleanupElementProperty 공개적으로 정적으로 프로퍼티

The cleanup element property
public static DependencyProperty,System.Windows CleanupElementProperty
리턴 System.Windows.DependencyProperty

IsBrowserInitializedProperty 공개적으로 정적으로 프로퍼티

The is browser initialized property
public static DependencyProperty,System.Windows IsBrowserInitializedProperty
리턴 System.Windows.DependencyProperty

IsLoadingProperty 공개적으로 정적으로 프로퍼티

The is loading property
public static DependencyProperty,System.Windows IsLoadingProperty
리턴 System.Windows.DependencyProperty

TitleProperty 공개적으로 정적으로 프로퍼티

The title property
public static DependencyProperty,System.Windows TitleProperty
리턴 System.Windows.DependencyProperty

TooltipTextProperty 공개적으로 정적으로 프로퍼티

The tooltip text property
public static DependencyProperty,System.Windows TooltipTextProperty
리턴 System.Windows.DependencyProperty

WebBrowserProperty 공개적으로 정적으로 프로퍼티

The WebBrowser property
public static DependencyProperty,System.Windows WebBrowserProperty
리턴 System.Windows.DependencyProperty

ZoomLevelIncrementProperty 공개적으로 정적으로 프로퍼티

The zoom level increment property
public static DependencyProperty,System.Windows ZoomLevelIncrementProperty
리턴 System.Windows.DependencyProperty

ZoomLevelProperty 공개적으로 정적으로 프로퍼티

The zoom level property
public static DependencyProperty,System.Windows ZoomLevelProperty
리턴 System.Windows.DependencyProperty