{
var pane = e.AffectedElement as RadPane;
if ( pane != null )
{
pane.Content = this.GetPaneContent( e.AffectedElementSerializationTag );
}
}
FYI, it is populated, however, in the RadDocking.ElementLoaded event.
6 Answers, 1 is accepted
This is expected as the element is not created yet in this event. This event lets you create the element yourself and pass it using the arguments. The element is created if you don't pass anything. I couldn't find where in the documentation it is set that this property shouldn't be null. Could please sent us a link - this way we will be able to find the error and fix it.
Regards,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.
ms-help://telerik.windows.controls.Silverlight/telerik.windows.controls.docking/raddocking-save-load-the-content-of-the-panes.html
Thank you for the provided information!
Does this article correspond to the following online help article: http://www.telerik.com/help/wpf/raddocking-features-save-load-layout.html?
If yes - do you mean the part at the end where is explained what which events does (this is the only part of the article where ElementLoading is mentioned)?
We will consider making the article more clear to avoid further misunderstandings.
Once again, thank you for the provided information! Your Telerik points were updated.
Kind regards,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.
Also, I think you may be incorrect that the e.AffectedElement should be expected to be null. Otherwise, there is no point to even having the ElementLoading event without a reference to the element being loaded. I don't think you need to fix your documentation, I think you need to fix the bug.
The property is null, because the element is not created yet. There is no point to allow the user to replace already created elements, because this way the element could be created twice. There is such property, because the event args inherit from the event args of the other events and the property is inherited as well.
Regards,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.
Your logic doesn't really make sense in your last post. If I decide to replace an element whether that be in the Loading or Loaded event, regardless the item will be created twice. The main difference is that if it is done in the Loading (Prior to Load) we remove the cost of Adding/Removing the discarded element from the visual tree.