Windows窗体主题Visual Studio .NET [英] Windows Form Theme Visual Studio .NET

查看:114
本文介绍了Windows窗体主题Visual Studio .NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!



所以我正在开发一个webbrowser,我只是想知道是否有办法在Visual Studio中创建主题,就像我一样想要改变Windows窗体本身的主题。



我需要第三方软件还是硬编码。

谢谢!

例如,我想在这里改变这件作品的外观。



https://gyazo.com/170165074354e39a290ba30e444ca42d [这就在这里]

推荐答案

嗯,WinForm提供的定制并不多。你不能轻易改变它们。阅读此主题 [ ^ ]。但是你可以转移到WPF。



或者尝试使用第三方工具,我想你会喜欢这样:

< a href =http://www.codeproject.com/Articles/61485/Winforms-SkinFramework> Winforms SkinFramework [ ^ ]

http:// skincrafter。 com / [ ^ ]

https://www.devexpress.com/ [ ^ ]



-KR
Umm, WinForm doesn't offer much to customize. You can't change them easily. Read this thread[^]. But you can move to WPF for that matter.

Or try using 3rd party tools, I guess you'd like this:
Winforms SkinFramework[^]
http://skincrafter.com/[^]
https://www.devexpress.com/[^]

-KR


我们这里的所有人都是新人一次,所以不要感到孤单。



重要的是你要为你的应用定义主题。术语主题可能意味着许多不同的东西。



我建议你首先列出你想要在运行时为最终用户提供哪些功能?时间。



能否编辑任何Form,Control或UserControl的外观?



一些特殊的编辑工具,可以轻松设置任何UI元素的可视属性,然后将其应用(由所有UI元素继承)在外部元素(Control,Form,UserControl)中的所有UI元素? br />


您是否希望用户能够修改TitleBar等标准表单元素?



一旦定义与使用Windows窗体相比,所需的功能,你将会更好地评估投资WPF。



我不同意Krunal Rohit的评论:虽然一般来说,在Windows窗体中执行主题比使用WPF更困难,其原因涉及总体架构两个平台之间存在差异。就像在WPF中一样,Windows窗体中存在窗体/控件的可视继承。



您确实可以在Windows窗体中执行主题,并且人们已经完成了正如你在我推荐给你的链接中看到的那样。可以说,在Windows窗体中实现主题化需要更多的努力,更多的代码......如果你自己动手,而不使用其他人的代码。



在实际层面上,选择WPF将涉及学习.NET应用程序编程的新范例......一个非常强大的...一个(对大多数人来说)一个非常陡峭的初始学习曲线。
All of us here were "new" once, so don't feel alone.

The important thing is for you to define what "theming" is for your application(s). The term "theming" can mean many different things.

I suggest you start by making a list of exactly what features you want to provide the end-user at run-time.

The ability to edit the look-and-feel of any Form, or Control, or UserControl ?

Some special editing facility that makes it easy to set visual properties for any UI element which will then be applied (are inherited by) all UI elements that are "within" the outer element (Control, Form, UserControl) ?

Do you want the user to be able to modify standard Form elements like TitleBar ?

Once you define the required features, you will be, imho, in a better place to evaluate investing in WPF compared to using Windows Forms.

I disagree with the comments of Krunal Rohit here: while it is more difficult, in general, to do theming in Windows Forms than WPF, the reasons for that involve the total architecture differences between the two "platforms." There is visual inheritance of Form/Controls in Windows Forms, just as there is in WPF.

You can, indeed, do theming in Windows Forms, and people have done it as you'll see in the links I referred you to. What's fair to say is that it will take more effort, more code, on your part to implement "theming" in Windows Forms ... if you do this "on your own," without using other people's code.

On a practical level, choosing WPF will involve learning a new paradigm for programming .NET applications ... a very powerful one ... one with (for most people) a very steep initial learning curve.


这篇关于Windows窗体主题Visual Studio .NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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