CefGlue.Core icon indicating copy to clipboard operation
CefGlue.Core copied to clipboard

Not working with Avalonia 0.9-preview8

Open vinerich opened this issue 5 years ago • 0 comments

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>

vinerich avatar Nov 27 '19 19:11 vinerich