WPF应用程序或WinForm WebBroswer? [英] WPF Application or WinForm WebBroswer?

查看:102
本文介绍了WPF应用程序或WinForm WebBroswer?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好CodeProject上的用户好吗!



所以我最近发布了一个关于WinForm主题选项的问题,结果证明,WinForm可能不是通往go,一个人说在WinForm中有很多选项可以用来控制主题,



基本上我想要完成的是。

我希望我的webbrowser在启动时有一个很好的干净标准主题,比如Firefox。

(不是标准的Windows TitleBar)



&我希望能够在使用webBrowser的同时获得可以选择的不同主题的列表。



现在,问题是,什么会使它变得更容易我来实现这个目标。

使用WPF应用程序或WinForm。



请分享您的意见并给我一些指示,如果你我也觉得有必要。

Hello there fellow users here on CodeProject!

So I recently posted a question about WinForm theme options and as it turns out, WinForm might not be the way to go, A person said that there isnt alot of options for chaning the theme in a WinForm,

Basically what I want to accomplish is.
I want my webbrowser to have a nice clean standard theme like Firefox on startup.
(Not the standard Windows TitleBar)

& I want to be able to have a list of different themes that I can choose from while using the webBrowser.

Now, the question is, what would make it easier for me toa ccomplish this goal.
By using a WPF Application or WinForm.

Please do share your opinion and give me some pointers if you feel the need too.

推荐答案

你甚至知道那是什么 WebBrowser [ ^ ]控件是?它只是安装在地下IE中的包装器,在较旧的系统或框架中,它正是 IE 7



要回答你的问题,哪个更好?



答案很简单,就是WPF。 WPF提供了更多的灵活性,扩展支持,是的,可以编辑每个控件的主题。如果您不喜欢旧的主题,旧的控件UI,您可以更改它们。只需编辑他们的模板,就是这样,你就完成了! WinForms不支持这么大的灵活性。



现在,如果你想在IE之上创建一个Web浏览器,我不会说这是一个好主意。这是一个非常糟糕的主意,因为WebBrowser控件为您提供了IE 7作为引擎。您可以以某种方式创建Web浏览器并添加一些扩展,并解决浏览器可能出现的一些问题。这非常容易和简单,看看我的文章:使用.NET的WebBrowser控件创建自定义Web浏览器 [ ^ ]



也就是说,如果你想构建一个真正的浏览器,请考虑使用一些好的渲染引擎并构建在它们之上。以下链接将帮助您完成此过程:



https://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser(v = vs.110)的.aspx [ ^ ]

更好的WPF-Browser-Control(IE-Wrapper) [ ^ ]

C#:WebBrowser vs Gecko vs Awesomium v​​s OpenWebKitSharp:选择什么以及如何使用 [ ^ ]
Do you even know what that WebBrowser[^] control is? It is simply a wrapper for underground IE that is installed, in older systems or frameworks, it is precisely IE 7.

To answer your question, "Which is better?"

The answer is simply, WPF. WPF provides much more flexibility, extension support and yes, the theme of each and every control can be edited. If you do not like the old theme, old control UI, you can change them all. Just edit their templates, that's it, you're done! WinForms doesn't support as much flexibility.

Now, if you want to create a web browser on top of IE, I won't say that it is a good idea. It is a very bad idea, because the WebBrowser control provides you with IE 7, as the engine. You can somehow create the web browser and add a few extensions and work out with some problems that may arise with the browser. That is pretty much easy and simple, have a look at my article: Creating a custom Web Browser using .NET's WebBrowser Control[^]

That said, if you want to build a "real browser", consider using some good rendering engines and build on top of them. The following links will help you in the process:

https://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser(v=vs.110).aspx[^]
A better WPF-Browser-Control (IE-Wrapper)[^]
C#: WebBrowser vs Gecko vs Awesomium vs OpenWebKitSharp: What To Choose And How to Use[^]


这篇关于WPF应用程序或WinForm WebBroswer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆