I am trying to find a way to get the Property to which a control is bound (in c#).
If I have the following:
I think this should do it:
BindingExpression be = BindingOperations.GetBindingExpression((FrameworkElement)yourComboBox, ((DependencyProperty)Button.SelectedItemProperty));
string Name = be.ParentBinding.Path.Path;
To give credit where it's due.
Have a look into using BindingExpression
IE:
var bindingExpression = this.myComboBox.GetBindingExpression(ComboBox.SelectedItem);
string bindingPath = bindingExpression.ParentBinding.Path.Path
I see you're using a DXE ComboBox instead of a standard - expecting it derives from a normal .NET control object, you should still have this functionality.