How to dynamically databind the Header of a RadPane?

1 posts, 0 answers
  1. Anders
    Anders avatar
    80 posts
    Member since:
    Dec 2010

    Posted 11 Oct 2011 Link to this post

    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?


    Anders, Denmark






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


    myBinding.Source = DataContext;



    SetBinding(TextBlock.TextProperty, myBinding);


Back to Top