Nicolas Dorier
Nicolas Dorier

Reputation: 7465

How to databind a DependencyObject is SL4 in code behind?

I saw that SL4 support binding on DependencyObject rather than FrameworkElement... This works fine in xaml, however I need to do that in code behind.

However I don't see any method "SetBinding" in the DependencyObject class, how can I do ?

Thanks for your responses

Upvotes: 1

Views: 238

Answers (1)

Joe McBride
Joe McBride

Reputation: 3777

You're looking for the BindingOperations.SetBinding() method.

Upvotes: 2

Related Questions