Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WPF中的数据绑定-文本框到通过数据/添加新数据源添加的业务对象_Wpf_Winforms_Visual Studio_Data Binding_Textbox - Fatal编程技术网

WPF中的数据绑定-文本框到通过数据/添加新数据源添加的业务对象

WPF中的数据绑定-文本框到通过数据/添加新数据源添加的业务对象,wpf,winforms,visual-studio,data-binding,textbox,Wpf,Winforms,Visual Studio,Data Binding,Textbox,在WinForms中非常简单,但在WPF中-使用System.Windows.Controls.TextBoxes,我不知道如何将它们绑定到业务对象,我只是将其添加为数据源(data,添加新数据源,对象);在设计师中,就是这样 使用WinForms,我所要做的就是转到它的属性,然后转到数据绑定和高级,在那里我可以将它的属性与对象的属性绑定 在WPF中这样做的等价物是什么?在XAML中非常容易: <TextBox Text="{Binding YourProperty}" />

在WinForms中非常简单,但在WPF中-使用
System.Windows.Controls.TextBox
es,我不知道如何将它们绑定到业务对象,我只是将其添加为数据源(
data
添加新数据源
对象
);在设计师中,就是这样

使用WinForms,我所要做的就是转到它的
属性
,然后转到
数据绑定
高级
,在那里我可以将它的属性与对象的属性绑定

在WPF中这样做的等价物是什么?

在XAML中非常容易:

<TextBox Text="{Binding YourProperty}" />


在VS2010 designer中,您还可以从属性网格执行此操作

WPF:simple TextBox数据绑定-