我结合域对象的属性,使用System.Windows.Forms.Label的Text属性DataBindings: Label l = new Label();
l.DataBindings.Add(new Binding("Text",myDomainObject,"MyProperty"));
但是,当我改变域对象,标签不反映更改。我知道对于像DataGridView这样的复杂控件,绑
我已经绑定我的列表框到一些数据。 问题是当我调用myTableAdapter.Fill(..)方法时,SelectedValue更改为列表中的第一个项目ID。尽管VS中的“选定的值”在任何地方都没有绑定(见图)。 alt text http://img370.imageshack.us/img370/2548/ss20090108212745qz2.png 我该如何预防这种行为? 非常感谢您的帮助
我将Image.Source属性绑定到下面显示的属性的结果。 public BitmapSource MyImageSource
{
get
{
BitmapSource source = null;
PngBitmapDecoder decoder;
using (var stream = new FileStream(@"C:\Tem