Seeking guidance for hosting a web browser control within shell package

Discussions related to custom development with Select.
Post Reply
toddsou
Posts: 75
Joined: Wed Jul 25, 2012 9:39 am

Seeking guidance for hosting a web browser control within shell package

Post by toddsou »

Hi-

I'm targeting SPS SDK 4.3.41.

I see in the SDK there is a class called HtmlBrowser2 control. But I also see in the ..../Select deployment folder that there appears to be evidence of the CefSharp/Chromium library at work behind the scenes.

Is the SDK's HtmlBrowser2 control simply a wrapper around the CefSharp offering ? Does it offer additional value? Can I directly access the underlying CefSharp control through it? ....Or should I simply target the underlying CefSharp libraries directly, bypassing the SPS SDK?

Fyi, I think I might need some js integration capabilities, and I know CefSharp offers this, but not sure if the SPS SDK hides (or enhances??) those features.

Seeking guidance, examples.

Regards,
Todd
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Seeking guidance for hosting a web browser control within shell package

Post by BobRichards »

I have sent your question to R&D for a response. I'll post it when I get an answer.
Bob Richards, Senior Software Developer, SoftPro
Pradeepa
Posts: 37
Joined: Fri Oct 03, 2008 1:22 pm

Re: Seeking guidance for hosting a web browser control within shell package

Post by Pradeepa »

Hi Todd,

HtmlBrowser2 is a user control that contains the CefSharp's ChromiumWebBrowser control as it's child control, with the following settings on it:

Code: Select all

var settings = new BrowserSettings();
settings.BackgroundColor = (uint)Colors.LightLightBlue.ToArgb();
settings.JavascriptCloseWindows = CefState.Disabled;
CefSharpSettings.LegacyJavascriptBindingEnabled = true;

SPS SDK does not hide any features. Here's a link to the nuget package we use:
https://www.nuget.org/packages/CefSharp.WinForms/71.0.2

I hope this answers your question.

Thanks,
Pradeepa.
Pradeepa Chandramohan
Software Engineer
SoftPro
toddsou
Posts: 75
Joined: Wed Jul 25, 2012 9:39 am

Re: Seeking guidance for hosting a web browser control within shell package

Post by toddsou »

Hi Pradeepa-

Yes, upon sitting on a breakpoint, I can see the underlying ChromiumWebBrowser control via HtmlBrowser2's Controls[0] indexer.

But I'm guessing SoftPro/support would frown upon accessing the underlying technology in this way. And also, SoftPro's support for my shell package solution would probably stop with anything I use beyond the SDK's HtmlBrowser2 class. Is that correct?

I think I talked myself into the answer. :-)

Ok, thanks.

-Todd
Post Reply