c# - CefSharp For WPF Not Displaying -


i installed cefsharp in application through nuget initialized in app.xaml.cs onstartup() method. when application runs nothing displayed , no errors. switching view out view doesn't use cefsharp displays normal. can't seem webpage render cefsharp.

view [questhtmlview]

<grid>     <grid.rowdefinitions>         <rowdefinition />     </grid.rowdefinitions>     <cefsharp:chromiumwebbrowser grid.row="0" address="https://github.com/cefsharp/cefsharp/wiki/frequently-asked-questions" /> </grid> 

viewmodel [questhtmlviewmodel]

public class questhtmlviewmodel : screen { } 

shellview (where previous view rendered)

<xctk:busyindicator verticalalignment="top" grid.row="1" grid.column="0" grid.rowspan="2" isbusy="{binding isbusy}">     <contentcontrol x:name="activeitem" /> </xctk:busyindicator> 

shellviewmodel (where cefsharp view set activeitem)[constructor only]

    public shellviewmodel()     {         questhtml = new questhtmlviewmodel();         activeitem = questhtml;     } 

initialization

protected override void onstartup(startupeventargs e) {     cef.initialize(new cefsettings());     base.onstartup(e); } 

you should initialize , show window in onstartup() method:

protected override void onstartup(startupeventargs e) {    mainwindow = new mainwindow();    mainwindow.showdialog();    base.onstartup(e); } 

and not forget remove startupuri property app.xaml. app.xaml should this:

<application x:class="testplace.app"              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">     <application.resources>      </application.resources> </application> 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -