2
我有一個Silverlight 4應用程序和編程我設置對象的某些綁定,例如:在Silverlight應用程序中調用SetBinding()兩次?
Binding bBorder = new Binding();
bBorder.Source = CellItem;
bBorder.Mode = BindingMode.OneWay;
bBorder.Path = new PropertyPath("Border");
appointmentItem.SetBinding(AppointmentItem.BorderBrushProperty, bBorder);
不管任何的最佳實踐經驗,如果這段代碼運行兩次,我將最終得到一個綁定已經註冊了兩次,還是先將綁定正確刪除?
感謝, 添
甚至在代碼隱藏中你是否設置了這些綁定?您還應該能夠直接在XAML中設置這些綁定。 – itchi