Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
view in contentpane re-rendering
posted

I have a ContentPane which in which I set the Content to a viewModel object. The viewmode is tied to a view using a dataTemplate.

The view is created and all is well.

The problem comes when I either want to float or dock the content object. When that action is performed the View constructor gets called.

Because of some code in the View code behind, which can be addressed, I get undesirable results.

If I assign the Content to the View object, set the data context this behavior of running through the View constructor each time does not occur.

So before I start fiddling with the code-behind my question: Is this expected behavior? And is there a way other to use the data template/VM to Content pattern to circumvent the re-entering of the View Constructor?

I can imagine why it might be happening but it certainly seems undesirable.

Thx

Rick

Parents
No Data
Reply Children
No Data