Rendering Issues

61 views
Skip to first unread message

Roshni Shende

unread,
Feb 8, 2015, 4:24:37 PM2/8/15
to cefs...@googlegroups.com
I am using cefsharp control to render (String Data) bunch of a screens into cef control. The behaviour of the control is not proper sometime data gets load properly and sometime it just shows blank screen.Here is the code which does rendering of screens 

 public void LoadDataToBlackBrowserControl(string BlackScreenData)
        
        {
            BlackBrowserControl.ResourceHandler.RegisterHandler("http://test/loader1", ResourceHandler.FromString(
                ShelfPickerHelperClass.GenerateScreenDoc(BlackScreenData)));
            BlackBrowserControl.Load("http://test/loader1");
        }

--------------------------------------------------------------------------------------------------------------------------------------------------


public void LoadDataToConvertedBrowserControl(string htmlScreenData)
        {
            ConvertedBrowserControl.ResourceHandler.RegisterHandler("http://test/loader1", ResourceHandler.FromString(
                ShelfPickerHelperClass.GenerateHTMLDoc(htmlScreenData)));
            ConvertedBrowserControl.ResourceHandler.RegisterHandler("http://test/default.css", ResourceHandler.FromFileName(
                ShelfPickerHelperClass.ResourceExplodePath + "default.css"));
            ConvertedBrowserControl.ResourceHandler.RegisterHandler("http://test/menuChevron.png", ResourceHandler.FromFileName(
                ShelfPickerHelperClass.ResourceExplodePath + "menuChevron.png"));
            ConvertedBrowserControl.Load("http://test/loader1");
        }




Does any one has some pearls of wisdom?

Any help would be appreciated.
Thank you 


Alex Maitland

unread,
Feb 8, 2015, 5:42:30 PM2/8/15
to cefs...@googlegroups.com

Roshni Shende

unread,
Feb 8, 2015, 11:52:16 PM2/8/15
to cefs...@googlegroups.com
Env C# .Net 4.5.1
cefsharp 37.0.0
WPF
Windows 8 os x86
I have cefbrowser control in xaml. I am loading some data into it. When I am loading it in the  code behind it shows data is loading but in UI(CEFBrowser control) Data does not get loaded(Sometime it does, Sometime not).
I have a file from where I am trying to load screens into group of buttons, When I click on Button It should render 2 screen one is in TEXT format and other is HTML. With webbrowser control(WPF in built control) It was not having any issues. But when I started using cefsharp Control, I have notice that sometime it works and sometime it just shows the blank screen.

I am using the previous(That I posted before) code to get screen and loading the method into control.

If you need any additional information Please let me know.

Thank you.


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Alex Maitland

unread,
Feb 9, 2015, 3:50:40 AM2/9/15
to cefs...@googlegroups.com
Your code doesn't really show any insights, if you can fork and modify `CefSharp.Wpf.Example` to reproduce your issue then that'll go a long way to resolve.

https://github.com/cefsharp/CefSharp/tree/master/CefSharp.Wpf.Example

If that's not an option then I'd suggest looking into using a Scheme Handler.

It should be noted that I recently fixed a bug when attempting to reload a Resource Handler, that probably isn't related, though I though I'd mention it regardless.

https://github.com/cefsharp/CefSharp/commit/54b1520761da125b29322670504e98a2eb56c855
Reply all
Reply to author
Forward
0 new messages