0

I'm asking about Column object - DataGridControl from Xceed's WPF Extended Toolkit. I need to create a Column in code, and add a binding to its Width property. Column class doesn't expose the SetBinding() method. Although in XAML - it supports bindings as usual:

<xcdg:Column Width="{Binding Path=ColWidth}">

Is there a way to make such binding to some ViewModel's property? Or a walkaround, possibly, to apply some Style or Template (static? created in code?) that would have a binding?

Alexey Titov
  • 235
  • 2
  • 9
  • `SetBinding` is a convenience method for some other static method of the same name if i remember correctly. Forgot where it's defined. EDIT: Thanks, google. – H.B. Jul 19 '16 at 15:38

1 Answers1

1

Use BindingOperations.SetBinding, it's the method that should be used internally by FrameworkElement.SetBinding.

H.B.
  • 166,899
  • 29
  • 327
  • 400