WPF parent-child window: binding reference problem

Posted by LukePet on Stack Overflow See other posts from Stack Overflow or by LukePet
Published on 2010-05-21T07:14:33Z Indexed on 2010/05/21 7:20 UTC
Read the original article Hit count: 890

Filed under:
|
|
|

I have a WPF Window that open a modal child window to load some data. Both window have a own viewmodel, now I have this problem: after I close the child window it seems still running in background!

To close the child window I set DialogResult from viewmodel command; now, if I create a new data and then I edit it from parent window (with the child window closed before), the child window still capture the property changed event for the properties previously bind.

How can avoid this?

I would clear every reference with data when I close modal window. Which is the best practise to do it?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about binding