TextBlock textBlock = new TextBlock();
//Set the binding.
textBlock.SetBinding(TextBlock.TextProperty,new Binding{ Source = this, Path = new PropertyPath("Width")});
//Remove the binding, only one-way is removed.
textBlock.Text = "";
//Remove the binding.
BindingOperations.ClearBinding(textBlock, TextBlock.TextProperty);
//Remove all the bindings.
BindingOperations.ClearAllBindings(textBlock);
Nothing is everything.
Tuesday, January 5, 2010
WPF Data Binding - Code
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment