vitalelement / cefglue.core Goto Github PK
View Code? Open in Web Editor NEWPort of CefGlue to .net Core
Port of CefGlue to .net Core
I cloned the project, updated the Avalonia Packages and I get compilation errors and obsolete advices. However, with Avalonia (0.8.1) works fine.
Hey there,
is it possible to just open a file (html/pdf) with this browser or can you only specify an URI?
Didn't found any option yet.
Thanks :)
Some more information if you are willing to answer another question:
I just want to show a pdf, no editing no nothing. Is there a simpler control than this webbrowser for avalonia?
Hi,
I tried building and publishing CefGlue.Samples.Avalonia from this repository. I found it runs fine on Windows 10, so then I published targeting Ubuntu 18.04 x64. When I tried running it, I first got the "Unable to load DLL 'libcef'" error, which I saw was fixed by #9 (comment)
Immediately afterwards, I get the above error: Unable to load DLL 'kernel32.dll'. I tried manually adding it, but no dice. Have you encountered this issue, and if so do you know of a solution? I want to get your project running on Linux. Any help is appreciated, thanks
Hey there,
just to let you know I tried including this control in my current project using Avalonia 0.9-preview8.
I installed all packages and currently am debugging in windows.
When i try to instantiate a window with the BrowserControl an InvalidOperationException -> "Failed to create browser." happens
StackTrace:
at Xilium.CefGlue.CefBrowserHost.CreateBrowser(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, String url, CefRequestContext requestContext)
at Xilium.CefGlue.CefBrowserHost.CreateBrowser(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, String url)
at CefGlue.Avalonia.AvaloniaCefBrowser.ArrangeOverride(Size arrangeBounds)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.Grid.ArrangeOverride(Size arrangeSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverrideImpl(Size finalSize, Vector offset)
at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverrideImpl(Size finalSize, Vector offset)
at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Layout.LayoutHelper.ArrangeChild(ILayoutable child, Size availableSize, Thickness padding)
at Avalonia.Controls.Primitives.VisualLayerManager.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Layout.LayoutHelper.ArrangeChild(ILayoutable child, Size availableSize, Thickness padding)
at Avalonia.Layout.LayoutHelper.ArrangeChild(ILayoutable child, Size availableSize, Thickness padding, Thickness borderThickness)
at Avalonia.Controls.Border.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
at Avalonia.Controls.Window.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.ExecuteInitialLayoutPass(ILayoutRoot root)
at Avalonia.Controls.Window.Show()
at Avalonia.Controls.DesktopApplicationExtensions.Run(Application app, Window mainWindow)
at RaveexUI.Program.AppMain(Application app, String[] args) in C:\Projects\Tanzschule\raveex\raveex-client\RaveexUI\Program.cs:line 35
at Avalonia.Controls.AppBuilderBase`1.Start(AppMainDelegate main, String[] args)
at RaveexUI.Program.Main(String[] args) in C:\Projects\Tanzschule\raveex\raveex-client\RaveexUI\Program.cs:line 16
The Data delivered with this exception is of type "System.Collections.ListDictionaryInternal" Count is 0.
UserControl:
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:cef="clr-namespace:CefGlue.Avalonia;assembly=CefGlue.Avalonia"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="RaveexUI.SampleCEF">
<Grid>
<cef:AvaloniaCefBrowser StartUrl="http://www.bing.com" />
</Grid>
</UserControl>
App.xaml:
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:RaveexUI"
x:Class="RaveexUI.App">
<Application.DataTemplates>
<local:ViewLocator />
</Application.DataTemplates>
<Application.Styles>
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml" />
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml" />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Default.xaml" />
<StyleInclude Source="resm:CefGlue.Avalonia.AvaloniaCefBrowser.xaml?assembly=CefGlue.Avalonia" />
</Application.Styles>
</Application>
There seems to be an event for starting and finished loading, but it doesn't even give the URL. Is there some way to extract the URL from the Avalonia (I assume it's the same across them) webview control?
Hi
I just found this project and wanted to try it out, unfortunately when I try to run build.ps1 I get this error:
PS D:\Code\GitHub\CefGlue.Core> .\build.ps1
Preparing to run build script...
Running build script...
Analyzing build script...
Processing build script...
Installing tools...
Installing addins...
Error: The assembly 'Cake.Compression, Version=0.1.1.0, Culture=neutral, PublicKeyToken=null'
is referencing an older version of Cake.Core (0.18.0).
This assembly need to reference at least Cake.Core version 0.22.0.
Another option is to downgrade Cake to an earlier version.
It's not recommended, but you can explicitly opt-out of assembly verification
by configuring the Skip Verification setting to true
(i.e. command line parameter "--settings_skipverification=true",
environment variable "CAKE_SETTINGS_SKIPVERIFICATION=true",
read more about configuration at https://cakebuild.net/docs/fundamentals/configuration)
When I open the sln in VS2017 eveything builds, but when I start debug it I get this:
System.TypeInitializationException occurred
HResult=0x80131534
Message=The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
Source=
StackTrace:
at Avalonia.Skia.FramebufferRenderTarget.CreateDrawingContext(IVisualBrushRenderer visualBrushRenderer)
at Avalonia.Rendering.ImmediateRenderer.Paint(Rect rect)
at Avalonia.Controls.TopLevel.HandlePaint(Rect rect)
at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
Inner Exception 1:
DllNotFoundException: Unable to load DLL 'libSkiaSharp': This operation is only valid in the context of an app container. (Exception from HRESULT: 0x8007109A)
Do I miss something?
When running the CefGlue.Samples.Avalonia project in Windows in a high DPI monitor (i.e. 4K), the browser isn't scaling correctly for high DPI and instead displays blurry content.
Hi!
I try to create Avalonia app with CefGlue and get following error in runtime:
Unable to load DLL 'libcef': Не найден указанный модуль. (Exception from HRESULT: 0x8007007E)
I've added packages as in the readme and in the sample project:
<PackageReference Include="VitalElement.CefGlue.Core" Version="0.9.0-build20-alpha" />
<PackageReference Include="VitalElement.CefGlue.Core.Avalonia" Version="0.9.0-build20-alpha" />
StackTrace:
at Xilium.CefGlue.Interop.cef_browser_host_t.create_browser(cef_window_info_t* windowInfo, cef_client_t* client, cef_string_t* url, cef_browser_settings_t* settings, cef_request_context_t* request_context)
at Xilium.CefGlue.CefBrowserHost.CreateBrowser(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, String url, CefRequestContext requestContext)
at CefGlue.Avalonia.AvaloniaCefBrowser.ArrangeOverride(Size arrangeBounds)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverrideImpl(Size finalSize, Vector offset)
at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverrideImpl(Size finalSize, Vector offset)
at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.Presenters.ItemsPresenterBase.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.Border.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.DockPanel.ArrangeOverride(Size arrangeSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.Border.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverrideImpl(Size finalSize, Vector offset)
at Avalonia.Controls.Presenters.ContentPresenter.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.Decorator.ArrangeOverride(Size finalSize)
at Avalonia.Controls.Primitives.AdornerDecorator.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Controls.Border.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Layout.Layoutable.ArrangeOverride(Size finalSize)
at Avalonia.Controls.WindowBase.ArrangeOverride(Size finalSize)
at Avalonia.Layout.Layoutable.ArrangeCore(Rect finalRect)
at Avalonia.Layout.Layoutable.Arrange(Rect rect)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control)
at Avalonia.Layout.LayoutManager.ExecuteArrangePass()
at Avalonia.Layout.LayoutManager.ExecuteLayoutPass()
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at FAFClient.Program.Main(String[] args) in H:\Projects\FAFClient.Net\FAFClient\Program.cs:line 13
It seem to can't run On Linux. Can this support for Linux?
This is probably an issue with CefGlue itself, though it causes problems here nevertheless.
When running the html5 test (html5test.com), the page identifies the browser as Chrome 57, and the latest version of Chrome is 73. This means the rendering engine is outdated compared to what Chrome is running today.
I have been trying to add the AvaloniaCefBrowser control to the official Avalonia ControlCatalogue Demo here: bitbonk/ControlCatalogStandalone@1b4a212
But I get the error “unable to create browser control with no additional information. What could I be doing wrong?
What is the license of this project? Thank you!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.