This is a migrated thread and some comments may be shown as answers.

How to dynamically databind the Header of a RadPane?

0 Answers 58 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Anders
Top achievements
Rank 1
Anders asked on 11 Oct 2011, 09:20 AM
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

 

 

 

 

 

Binding myBinding = _isPropertyEditor ? new Binding("DisplayNameEditor") : new Binding("DisplayNamePropertyEditor");

 

myBinding.Source = DataContext;

Header.

 

SetBinding(TextBlock.TextProperty, myBinding);

 

No answers yet. Maybe you can help?

Tags
Docking
Asked by
Anders
Top achievements
Rank 1
Share this question
or