Hi telerik,
I'd like to write code that dynamically binds the Header to different properties on the DataContext depending on a bool.
I've found below code, but 'Header' is not the object to use in code - can you help me?
Thanks,
Anders, Denmark
                                I'd like to write code that dynamically binds the Header to different properties on the DataContext depending on a bool.
I've found below code, but 'Header' is not the object to use in code - can you help me?
Thanks,
Anders, Denmark
 
 
 
Binding myBinding = _isPropertyEditor ? new Binding("DisplayNameEditor") : new Binding("DisplayNamePropertyEditor"); 
 
myBinding.Source = DataContext;
Header.
 
SetBinding(TextBlock.TextProperty, myBinding); 
 
