使用 C# 在 Windows 7 中创建 Metro 风格的 winform

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9939070/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-09 11:18:21  来源:igfitidea点击:

Creating metro style winform in windows 7 using C#

c#winformsmicrosoft-metro

提问by reaper_unique

Is it possible to design a metro styled winform in visual studio 10 or visual studio 11 on windows 7? If so, where can I find info on how to do it? I have already found some links, like http://msdn.microsoft.com/en-us/library/windows/apps/br211380But I don't get the Windows Metro style.

是否可以在 windows 7 上的 Visual Studio 10 或 Visual Studio 11 中设计 Metro 风格的 winform?如果是这样,我在哪里可以找到有关如何操作的信息?我已经找到了一些链接,比如 http://msdn.microsoft.com/en-us/library/windows/apps/br211380但我没有得到 Windows Metro 风格。

Can anyone help me with this?

谁能帮我这个?

采纳答案by Lex Li

The strict Metro UI apps are Windows 8 only, and they require WinRT.

严格的 Metro UI 应用程序仅适用于 Windows 8,并且它们需要 WinRT。

But if you want to simulate the Metro style in Windows 7 and Windows Forms, you can use third party controls (or develop your own), such as the Telerik ones,

但是如果你想在 Windows 7 和 Windows Forms 中模拟 Metro 风格,你可以使用第三方控件(或开发你自己的),比如 Telerik 的,

http://www.telerik.com/products/winforms.aspx

http://www.telerik.com/products/winforms.aspx

回答by Alexander R

You can make Metro styled apps with Visual Studio 11 Beta for Windows 8, with the correct SDK. Reading the article youlinked gave me this linkto download everything you need.

您可以使用适用于 Windows 8 的 Visual Studio 11 Beta 和正确的 SDK 制作 Metro 风格的应用程序。阅读链接的文章给了我这个链接来下载你需要的一切。

Download that, follow the tutorial you've already got.

下载它,按照您已经获得的教程进行操作。

Update: As @bobsmith833 mentions, Metro and WinForms are different frameworks entirely. There's no way to use the two together. You'll have to go for Windows 8 and the Metro framwork if you want to make these apps.

更新:正如@bobsmith833 所提到的,Metro 和 WinForms 是完全不同的框架。没有办法将两者一起使用。如果您想制作这些应用程序,您必须使用 Windows 8 和 Metro 框架。

回答by Stephen Holt

Windows Metro style apps do not currently work on Windows 7.

Windows Metro 风格的应用程序目前无法在 Windows 7 上运行。

I have also heard that it is unlikely there will ever be a version of Metro for Win 7 - I think their operation goes too far to the heart of Windows for that to be practical.

我还听说不太可能有适用于 Win 7 的 Metro 版本——我认为他们的操作对 Windows 的核心来说太过分了,以至于不实用。

So you'll have to bite the bullet and get the Win 8 preview I'm afraid.

因此,恐怕您必须硬着头皮获得 Win 8 预览版。

回答by ABH

There is another third party library to create Metro Styles applications in Windows 7 using Windows Forms. Check Devcomponents.

还有另一个第三方库可以使用 Windows 窗体在 Windows 7 中创建 Metro Styles 应用程序。检查开发组件

回答by Bahad?r Ya?an

If you are after the metro design, not the actual metro framework, devexpresshas the components you need.

如果您追求的是 Metro 设计,而不是实际的 Metro 框架,那么 devexpress拥有您需要的组件。

回答by JeeShen Lee

Try WPF development using Elysium library on codeplex - http://elysium.codeplex.com/.

在 codeplex - http://elysium.codeplex.com/上尝试使用 Elysium 库进行 WPF 开发。

You can find the installation guide and sample implementation code here http://bizvise.com/2012/09/27/how-to-create-metro-style-window-on-wpf-using-elysium/

您可以在此处找到安装指南和示例实现代码 http://bizvise.com/2012/09/27/how-to-create-metro-style-window-on-wpf-using-elysium/

回答by Peter Sunde

You should take a look at https://github.com/viperneo/winforms-modernuiit provides Metro style for WinForms applications. It works with NET Framework 2.0 and above.

您应该查看https://github.com/viperneo/winforms-modernui它为 WinForms 应用程序提供 Metro 风格。它适用于 NET Framework 2.0 及更高版本。

回答by swalter88

Easily. If you use Windows Forms, go to Solution Explorer and right-click the solution. Select from the menu the NuGet controler or sth like that. The program will load widgets, from which you can choose one depending on your needs and install it. For a Metro design, I use Metro UI. Just write the key words in the search panel. After installation, add the controls to the toolbox. For more info, search Foxlearn's video. ;-)

容易地。如果您使用 Windows 窗体,请转到解决方案资源管理器并右键单击该解决方案。从菜单中选择 NuGet 控制器或类似的东西。该程序将加载小部件,您可以根据需要从中选择一个并安装它。对于 Metro 设计,我使用 Metro UI。只需在搜索面板中输入关键词即可。安装后,将控件添加到工具箱中。有关更多信息,请搜索 Foxlearn 的视频。;-)