将Raspberry Pi 3与C#Winforms和WPF连接起来 [英] Interfacing Raspberry Pi 3 with C# Winforms and WPF

查看:61
本文介绍了将Raspberry Pi 3与C#Winforms和WPF连接起来的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试将 Raspberry Pi 3与C#连接。我想要一个建议,因为操作Pi 3的更好选择是什么? C#
Winform 或C# WPF ?还有一些关于如何完成这项任务的提示。


I am trying to interface Raspberry Pi 3 with C#. I want a suggestion as what would be a better option to operate Pi 3? C# Winform or C# WPF? And also some tips on how this task can be accomplished.

推荐答案

嗨阿里,

抱歉,我可以不完全理解你的问题,你的意思是如何在Winform和WPF之间做出选择吗?

Sorry that I can not fully understand your question, Do you mean how to choose between Winform and WPF?

winform和WPF都用于桌面应用程序开发,这两者都是微软的开发技术,但它们都是仍有一些差异:

Both winform and WPF are used for desktop application development, both of which are Microsoft's development technologies, but they still have some differences:

WinForms和WPF之间最重要的区别在于,虽然WinForms只是标准Windows控件(例如TextBox)之上的一层,但WPF是从头开始构建,几乎在所有
情况下都不依赖于标准的Windows控件。这可能看起来像是一个微妙的区别,但实际上并非如此,如果你曾经使用过依赖Win32 / WinAPI的框架,你肯定会注意到。

The single most important difference between WinForms and WPF is the fact that while WinForms is simply a layer on top of the standard Windows controls (e.g. a TextBox), WPF is built from scratch and doesn't rely on standard Windows controls in almost all situations. This might seem like a subtle difference, but it really isn't, which you will definitely notice if you have ever worked with a framework that depends on Win32/WinAPI.

WPF优点:

1,它更新,因此更符合当前标准。
b
2,微软正在将它用于许多新应用,例如Visual Studio。

3,它更灵活,所以你可以做更多的事情,而无需编写或购买新的控件。

4,当你需要使用第三方时控件,这些控件的开发人员可能会更专注于WPF,因为它更新。

5,XAML可以轻松创建和编辑GUI,并允许工作在设计器之间分配( XAML)和程序员(C#,VB.NET等)。

6,数据绑定,它可以让你更清晰地分离数据和布局。

7 ,使用硬件加速来绘制GUI,以获得更好的性能。

8,它允许您为Windows应用程序和Web应用程序(Silverlight / XBAP)创建用户界面。

1, It's newer and thereby more in tune with current standards.
2, Microsoft is using it for a lot of new applications, e.g. Visual Studio.
3, It's more flexible, so you can do more things without having to write or buy new controls.
4, When you do need to use 3rd party controls, the developers of these controls will likely be more focused on WPF because it's newer.
5, XAML makes it easy to create and edit your GUI, and allows the work to be split between a designer (XAML) and a programmer (C#, VB.NET etc.).
6, Databinding, which allows you to get a more clean separation of data and layout.
7, Uses hardware acceleration for drawing the GUI, for better performance.
8, It allows you to make user interfaces for both Windows applications and web applications (Silverlight/XBAP).

WinForms的优势

1,它更老了,因此经过了更多的尝试和测试。

2,已经有很多了您可以免费购买或获得的第三方控件。

3,Visual Studio中的设计师在写作时仍然是赌注对于WinForms来说,要比使用WPF,你必须自己用WPF做更多的工作。

1, It's older and thereby more tried and tested.
2, There are already a lot of 3rd party controls that you can buy or get for free.
3, The designer in Visual Studio is still, as of writing, better for WinForms than for WPF, where you will have to do more of the work yourself with WPF.

所以你可以选择更适合你自己的技术。

So you can choose a more suitable for your own technology.

最诚挚的问候,

Stanly


这篇关于将Raspberry Pi 3与C#Winforms和WPF连接起来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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