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

Setting Pane Title during ElementLoaded

1 Answer 46 Views
Docking
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 20 Apr 2010, 11:12 AM
Hello,

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.

Regards,

James.

1 Answer, 1 is accepted

Sort by
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 22 Apr 2010, 04:18 PM
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.
Tags
Docking
Asked by
James
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or