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

DataContext lost on Layout Load

3 Answers 32 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 25 Nov 2013, 03:54 PM
As per a fix for the GridView losing the binding when moving panes around I have the DataContext set in the RadPane that the GridView control is in. However now I've implemented the Save/Load for the layout this binding, when declared in XAML is lost.

It's not a huge issue, as after the load I set the datacontext in the code. However is this by design, or is there a bug in the load layout that loses this binding?

Cheers, Mike...

3 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 28 Nov 2013, 09:37 AM
Hi,

The Save/Load layout functionality is designed to save the Docking Pane's position/size but the value of the bindings are not saved which is an expected behavior.

You can take a look at this forum thread in which the topic is discussed in greater detail.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Mike
Top achievements
Rank 1
answered on 06 Dec 2013, 10:33 PM
I don't want to save/load the bindings on the panes, but as I have pretty much all of my bindings defined in XAML these get lost/removed when I load in the layout, which is not what I would have expected to happen.

I've worked around this by defining them in the code behind, as I said, but if the non-saving of the bindings is expected behaviour I would also expect that the loading of the layouts wouldn't clear any bindings I have in XAML

Thanks, Mike...
0
George
Telerik team
answered on 12 Dec 2013, 08:14 AM
Hi Mike,

Setting SerializationTag to the panes will ensure that the bindings won't be cleared. Can you give it a try and let me know if this helps? It if doesn't help, can you send us a sample project so we can test it on our side?

I am glad to assist you further.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Docking
Asked by
Mike
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Mike
Top achievements
Rank 1
George
Telerik team
Share this question
or