wpf vs winforms [英] wpf vs winforms

查看:92
本文介绍了wpf vs winforms的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿大家, 

hey everyone, 

我是WPF的新手。 

i'm new to WPF. 

到现在为止,我看不到在数据绑定方面,WPF以什么方式比winforms更强大。

until now, i don't see in what way WPF is more powerful than winforms when it comes to databinding.

如果有人能向我澄清事情,我将不胜感激。

i'll be grateful if someone can clarify things to me.

谢谢。

推荐答案

我认为最大的区别是WPF使用{Binding ...}语句。 
绑定
对象用于实现接口控制属性绑定之间的背景数据。

I think the biggest difference is that WPF uses {Binding ...} statement.  Binding object is used to achieve the interface control properties and background data between the binding.

WPF绑定引擎从Binding对象获取有关以下内容的信息:


  • 绑定目标和绑定源
  • 数据流的方向,支持双向绑定。
  • < span id ="x_x_x_x_result_box"lang ="en"tabindex =" - 1">  转换器

绑定中的WPF和WinForm之间存在以下差异。

There are the following differences between WPF and WinForm in the Binding .

1 。 绑定通过XAML语句实现耦合接口和数据。

1. Binding achieve coupling interface and data through XAML statement.

2。使用
Mode
属性指定数据流的方向。支持单向和双向绑定,为了使绑定目标属性能够自动反映绑定源的动态变化,您需要实现

INotifyPropertyChanged
以提供适当的属性更改通知。

2. Using the Mode property to specify the direction of the data flow. support one way and two way bindings, For enable your binding target properties to automatically reflect the dynamic changes of the binding source , your needs implement INotifyPropertyChanged to provide the proper property changed notifications.

3。使用
UpdateSourceTrigger
属性,用于确定绑定源更新的时间。

3. Using UpdateSourceTrigger property to determine the timing of binding source updates.

有关数据绑定的更多详细信息,请参阅以下MSDN文档。我希望这能引导你朝着一个好方向前进。

More details about Data Binding please refer below MSDN documents. I hope this guides you in a good direction.

绑定类

Windows Presentation Foundation数据绑定:第1部分

Windows Presentation Foundation Data Binding: Part 1

Windows Presentation Foundation数据绑定:第2部分

我搜索了一些关于你问题的类似线程。

I search some similar threads about your question.

WPF中的数据绑定与Windows窗体比较

绑定:WPF与WinForms

最诚挚的问候,

Bob

Bob


这篇关于wpf vs winforms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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