Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with Avalonia 0.9-preview8 #22

Open
vinerich opened this issue Nov 27, 2019 · 0 comments
Open

Not working with Avalonia 0.9-preview8 #22

vinerich opened this issue Nov 27, 2019 · 0 comments

Comments

@vinerich
Copy link

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant