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

What populates the AffectedElementSerializationTag?

2 Answers 44 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Trevor Leybourne
Top achievements
Rank 2
Trevor Leybourne asked on 14 Jun 2010, 05:57 AM
Hi there, I am trying to define a Load/Save Layout with content function and my event only returns a null AffectedElementSerializationTag. What populates this value?

My code is as follows:

        private string GetLayout()
        {
            using (var stream = new MemoryStream())
            {
                docking.ElementSaved += ElementSaved;
                docking.SaveLayout(stream, true);
                docking.ElementSaved -= ElementSaved;

                stream.Position = 0; 
                using (var reader = new StreamReader(stream)) {
                    return reader.ReadToEnd();
                }
            }
        }
        void ElementSaved(object sender, LayoutSerializationEventArgs e)
        {
            var pane = e.AffectedElement as RadPane;
            if (pane != null)
            {



                //pane.Content = this.GetPaneContent(e.AffectedElementSerializationTag);
            }
        }

In the above, e.AffectedElementSerializationTag is always NULL.

Trevor

2 Answers, 1 is accepted

Sort by
0
Trevor Leybourne
Top achievements
Rank 2
answered on 15 Jun 2010, 08:32 PM
I have worked this out. This can be set through XAML as a dependancy property on the RadDocking control for the Pane or through code by using the SetValue method to set the DependencyProperty. There is no exposed public property to set this value directly in code.
0
Miroslav Nedyalkov
Telerik team
answered on 16 Jun 2010, 12:57 PM
Hi Trevor,

 Yes, we decided to make the SerializationTag an attached property. You could read more about this in the following help article: http://www.telerik.com/help/silverlight/raddocking-features-save-load-layout.html.

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.
Tags
Docking
Asked by
Trevor Leybourne
Top achievements
Rank 2
Answers by
Trevor Leybourne
Top achievements
Rank 2
Miroslav Nedyalkov
Telerik team
Share this question
or