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

CEF3: Consider dropping the WinForms control #241

Closed
perlun opened this issue Feb 4, 2014 · 30 comments
Closed

CEF3: Consider dropping the WinForms control #241

perlun opened this issue Feb 4, 2014 · 30 comments

Comments

@perlun
Copy link
Member

perlun commented Feb 4, 2014

This isn't as controversial as it seems; it's quite easy to host WPF controls in a Windows Forms app. However, I do feel that with the current level of stability, and maturity of the example app (for example), the Windows Forms control doesn't really do CefSharp3 justice. It would be better (IMHO) to just drop it, and instead recommend people to just use WPF. If they must use it in a WinForms application, the link in this issue would be the solution.

What does the rest of you feel about this? Good idea or bad?

I think the alternative would be for someone to really dig into the WinForms code, try to make it good and so on (a little bit like I've been doing with the WPF one), but this hasn't really happened thus far. I don't use WinForms personally, frankly I hate it. 😃 So it's very unlikely that I will take some of my small amount of time and dedicate it on something like that.

@peters
Copy link
Contributor

peters commented Feb 6, 2014

+1 get rid of winforms is a great idea.

@jorgeleo
Copy link

jorgeleo commented Feb 6, 2014

-1 Winforms is the only windows desktop technology still alive. WPF has stopped his evolution, and using a WPF in a winforms app introduces undesirable/unneeded dependencies.

@perlun
Copy link
Member Author

perlun commented Feb 7, 2014

@jorgeleo good points. The only problem is that we don't really have anyone working on making the WinForms stuff stable & usable enough. Do you volunteer? If not, I'm afraid your vote cannot be counted; we cannot really ship stuff that doesn't work, it's worse than not shipping it at all IMHO.

@jorgeleo
Copy link

jorgeleo commented Feb 7, 2014

I'll make sure that I can build before I commit to maintain it

@perlun
Copy link
Member Author

perlun commented Feb 10, 2014

😄 Good point...

@perlun
Copy link
Member Author

perlun commented Feb 11, 2014

@jorgeleo Btw, what do you mean with "undesirable/unneeded dependencies"? Is this really a problem in reality, or is just that it "feels" bad? I mean, WPF is a part of the normal .NET Framework; it's not like you would ever run into a machine where only .NET/Windows Forms is available and not .NET/WPF is there...

I think it sounds more like you don't happen to "like WPF" (which I can accept) than a factual argument, if you ask me. Do you see my point?

@RobertChrist
Copy link

I'd like to double down on jergeleo's point. Firefox's main support for this type of library is GeckoFx, which is based ontop of a winform control. Since both Gecko and IE therefore have winform controls, I'm willing to bet that most places that are in need of something like this for chrome already have existing technology built on winforms.

@perlun
Copy link
Member Author

perlun commented Mar 8, 2014

@RobertChrist, I see your point - but you shouldn't neglect the fact that we're not only dealing with "old", existing applications here, but also new applications needing to integrate web content (and new applications might as well be written in WPF rather than WinForms). The app which I use myself, which triggered me to start contributing to CefSharp in the first place, is a WPF app, and I think it's important to remember that CefSharp is especially important for WPF (since i.e. the IE web control doesn't support transparency properly, for example).

Also, I haven't really seen any hard facts as to what the problem would be to say to WinForms people that they can use the WPF control and host it in an ElementHost? It doesn't really add any extra dependency to your app; all the required WPF assemblies are included in the .NET Framework anyway...

Let me put it like this: which is worst, having a low-quality Windows Forms control (that will harm the reputation of the project), or having no Windows Forms control at all (and suggesting people use the ElementHost-based approach)? I tend to lean toward the latter.

If you (@RobertChrist or @jorgeleo, or anyone else for that matter) feel like contributing time to make the Windows Forms control (in CefSharp3, that is) + also the WinForms example be of equal quality as the WPF control & example - be my guest. I'm not against it, not at all. But since there aren't really that many people willing to contribute time to make the Windows Forms excel, perhaps that's a sign in itself also...?

Food for thought. Please prove me wrong; I like to be a bit provocative you know... 😃

@RobertChrist
Copy link

You can only do what you can do, right? Every project has limitations.

I would absolutely be happy to whip the cef3 winform example into shape, or, in general, lend my hand anywhere c# development is needed. I haven't dabbled in C++ since early college, however, so I'm not sure how much help I can be to you in developing CefSharp3 overall.

@jornh
Copy link
Contributor

jornh commented Mar 11, 2014

@RobertChrist (and others with interest in seeing CefSharp3 with solid WinForms support) that really would be great!

Note: Not only the CefSharp.WinForms.Example but also CefSharp.WinForms project https://github.com/cefsharp/CefSharp/tree/v3.29.0-pre.0/CefSharp.WinForms is C# code. The primary reason the project looks like it is has a high amount of C++ is that the upstream CEF API code also lives in the repo. In addition several of the C++ projects in CefSharp1 has been converted to C# so don't be scared too much by the C++ label on the project.

@perlun
Copy link
Member Author

perlun commented Mar 14, 2014

I think the first step would be to try and get the WinForms example anywhere near looking the same as the WPF example. I.e. "execute script", "evaluate scrpit" etc. buttons to the right. I'm not that excellent at Windows Forms though, so I could really take some help there.

Also, getting trivial stuff like the Enter key working for navigating to a URL should be a fairly simple task to fix... 😃

With a few changes like these + the stability fix (#214) I think we are pretty close to making CefSharp3 for WinForms be "ready for general use".

@josephxanderson
Copy link

@perlun, if you don't already have someone working on this, I can try working on it. I'm developing a WinForms application using CefSharp currently, and was excited to see CEF 3 support coming.

If there was more documentation about how the multiprocess works with CefSharp 3 (and if there is I couldn't find it!) I can modify it to be a tabbed browser.

@perlun
Copy link
Member Author

perlun commented Mar 18, 2014

@jothousand, great news! I created a separate issue for it #279 - let's continue the discussion there. We should also try and get #236 sorted I feel.

@RobertChrist
Copy link

Heyo! I haven't forgotten about this. I'm pretty slammed for the next ~2
weeks or so, am hoping to start looking at this after that.

Rob

On Tue, Mar 18, 2014 at 4:28 PM, Per Lundberg notifications@github.comwrote:

@jothousand https://github.com/jothousand, great news! I created a
separate issue for it #279https://github.com/cefsharp/CefSharp/issues/279\- let's continue the discussion there. We should also try and get
#236 #236 sorted I feel.


Reply to this email directly or view it on GitHubhttps://github.com//issues/241#issuecomment-37983386
.

jornh added a commit to jornh/CefSharp that referenced this issue Apr 5, 2014
At the least navigate to a page on startup. Still all navigation buttons are broken like already recorded in cefsharp#241 and what it points to.
@perlun
Copy link
Member Author

perlun commented Apr 10, 2014

Heyo! I haven't forgotten about this. I'm pretty slammed for the next ~2
weeks or so, am hoping to start looking at this after that.

Sounds good! "You're our last hope, Obi-Wan!"

@treeform
Copy link

Hi. I am building new app. I did not know WinForms was being deprecated. How could I host a WPF view in winforms?

@amaitland
Copy link
Member

@perlun I'm happy to commit some time to getting WinForms up to scratch. PR #349 gets the basics working.

@jornh
Copy link
Contributor

jornh commented May 16, 2014

I think with #349 now merged we can reduce the considerations mentioned in the title of this issue somewhat 😜 @amaitland turned out to be our Obi-wan for the groundwork on this. Thanks mate!

Those with an interest in WinForms please take latest master branch for a test drive and voice your opinion on if you think it is ready - and if it's worthy for considering to cut a (prerelease?) WinForms NuGet?

See the ”Building CefSharp from source” if you need some details on how.

I'll leave this issue open for input ...

@jornh
Copy link
Contributor

jornh commented May 16, 2014

@treeform welcome to CefSharp! See the link in #241 (comment).

There might still be uses for embedding Wpf in WinForms as it uses the offscreen rendering path in the upstream CEF which has somewhat different behavior. E.g. it has easy support of graphics transforms with opacity etc. as illustrated by the WPF example application.

@penderi
Copy link

penderi commented May 19, 2014

We'd like WinForms with latest. It's saves a major re-write for us...

@amaitland
Copy link
Member

@penderi Are there any particular features you require in the CefSharp3 WinForms that aren't there currently?

@RobertChrist
Copy link

GetImage is exposed in Cef, but not available in cefsharp3. It is exposed
on cef_browser.h

On Tue, May 20, 2014 at 10:00 PM, amaitland notifications@github.comwrote:

@penderi https://github.com/penderi Are there any particular features
you require in the CefSharp3 WinForms that aren't there currently?


Reply to this email directly or view it on GitHubhttps://github.com//issues/241#issuecomment-43704676
.

@jornh
Copy link
Contributor

jornh commented May 21, 2014

@RobertChrist I did a quick look in http://magpcss.org/ceforum/apidocs3/projects/(default)/CefBrowser.html which matches the CEF3 version our current master branch is using. You are right it is in CEF1 though -> http://magpcss.org/ceforum/apidocs/projects/(default)/CefBrowser.html#GetImage(PaintElementType,int,int,void*)

@perlun
Copy link
Member Author

perlun commented Jun 10, 2014

Closing this one - we will definitely keep the WinForms control, since people have started actually caring about it (and not just from a user's POV).

@perlun perlun closed this as completed Jun 10, 2014
@davewthompson
Copy link

Sorry to chime in here (if I can - please delete if you feel this is not necessary) but Winforms is NOT deprecated. It is simply another MS technology for developing client applications.

Microsoft have said this themselves in recent TechEd discussions (http://www.infoq.com/news/2014/04/WPF-QA).

I don't want to have my app bloat out its heapspace by loading God-knows-how-many assemblies into its memory space to use CEF if it only exists as a WPF control. So if I can help out working on the Windows Forms port, let me know.

Dave

@amaitland
Copy link
Member

Windows Forms is continuing to be supported, but in maintenance mode. They will fix bugs as they are discovered, but new functionality is off the table.

@davewthompson Long as there is enough interest from Developers in a WinForms version then we'll continue to maintain one. Unfortunately Maintenance mode does sound very much long the end for WinForms long term 😦

@jornh jornh modified the milestone: 35.0.0 Oct 3, 2014
@cwaldron
Copy link

cwaldron commented Mar 2, 2016

Keep Winforms. There are many developers that have never programmed WPF and never needed to. The reason why is many of these application are enterprise apps and never required fancy rendering. Chromium does its own off screen rendering. Winforms merely provided a host environment and its far easier to use than WPF. The main issue Winforms developers have with WPF is XAML and this will impeded the adoption of CEFSharp.

In addition, you have no portability story with WPF. At least Mono (Xamarin) supports WinForms and will make it easier to port to Linux & Mac a Winforms based application. So with WinForms you have a consistent hosting environment and a portability story.

It would be interesting to know the issues with hosting CEF in WinForms to see if they can be resolved.

@amaitland
Copy link
Member

@cwaldron Your two years late to the party here.....

@mortalV
Copy link

mortalV commented Mar 2, 2016

Just my 2 cents...
WinForms must live until WPF version will works with D3DImage,
because today with bitmap copy it's less smoother animation and more CPU eating specially for WebGL application and 60 FPS.

@amaitland
Copy link
Member

@mortalV This issue was closed almost two years ago, it's not relevant!!!

I'm going to lock this now, hopefully that gives everyone gets the message.

@cefsharp cefsharp locked and limited conversation to collaborators Mar 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests