Setting Pane Title during ElementLoaded

2 posts, 1 answers
  1. James
    James avatar
    136 posts
    Member since:
    Nov 2008

    Posted 20 Apr 2010 Link to this post


    I'm having problems setting the Title property on a RadPane during the ElementLoaded event - no matter what I set it to it never renders the new value, but instead the old value that was previously displayed appears (what I mean by old value is the value that was displayed before SaveLayout was last called).

    Can you replicate this?

    I am using 2010.1.0412.


  2. Answer
    Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 22 Apr 2010 Link to this post

    Hi James,

     The reason why setting the Title property is not changing the Header of the pane is that the value of the Pane is serialized with the layout and after that its value is updated with the serialized one. If you set inly the Title property, the pane binds its Header property to its Title property and this binding gets broken when the layout is loaded. What I could suggest you is to reset this binding when setting the new Title like this:

    var pane = e.AffectedElement as RadPane;
    if (pane != null)
        pane.SetBinding(RadPane.HeaderProperty, new Binding("Title") { Source = pane });
        pane.Title = "Pane's new title!";

    Hope this helps!

    Sincerely yours,
    Miroslav Nedyalkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top