Sabrina_cs
Sabrina_cs

Reputation: 421

How To Reset a Binding from Code Behind

on a Window I have a Tab Control containing a Control in each tab item and a Slider in the Status bar that has to be Bound on the fly to a Field in the Currently active TabItem control. I Will bind it using the code behind, but seeing that the user can switch multiple times from a tab to another and that the control has a SetBinding method but not a ResetBinding method I was wondering if There was Something to clear the Binding before setting the new control value something like:

myslider.RemovePreviousBinding
...
mySlider.SetBinding(Slider.Value, mynewBinding);

Or it does not bother and the previous binding is reset when I set the new one. I don't like the Idea of having memory leaks or multiple bindings making strange behaviors to the controls. Thank you in advance

Upvotes: 0

Views: 889

Answers (1)

Related Questions