Finally I got it working with some confusions. The problem why the KeepAlive property did not get called was because I used ItemControl as the region container. Then I changed to use ContenControl. The KeepAlive property got called and the view got removed when navigating. However, since the ContentControl is being used for the region container, I'm curious that if none of views (or view models) implement IRegionMemberLifetime, would removing a view still work? The result is that it's still working without IRegionMemberLifetime.
Brew
- Is this the prism behavior by default?
- What controls for the region container are applicable to the KeepAlive property? For my experiences, ItemControl does not work. Only ContentControl works.
Thanks,Brew