How to: Clear Bindings
This example shows how to clear bindings from an object.
Example
To clear a binding from an individual property on an object, call ClearBinding as shown in the following example. The following example removes the binding from the TextProperty of mytext, a TextBlock object.
BindingOperations.ClearBinding(myText, TextBlock.TextProperty);
BindingOperations.ClearBinding(Me.myText, TextBlock.TextProperty)
Clearing the binding removes the binding so that the value of the dependency property is changed to whatever it would have been without the binding. This value could be a default value, an inherited value, or a value from a data template binding.
To clear bindings from all possible properties on an object, use ClearAllBindings.
See also
.NET Desktop feedback
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: