Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

New Post: Screen View Caching Bug?

$
0
0
Hi There,

I am new to Caliburn.Micro, so I may just be missing something obvous...

I have a ShellView that has a ListBox bound to a list of 3 ViewModels (@ : Screen), and it's SelectedItem bound to the ActiveItem; and there is a ContentControl bound to the ActiveItem as well. The ShellViewModel : Conductor<IScreen>.Collection.OneActive. When an item is selected in the ListBox, the correct view is rendered in the ContentControl, and this works correctly for all 3 of the items, the first time their views are rendered.

However, there appears to be a bug in the view caching, and here's how it occurs:
  • Clicking the 1st item creates and renders a new 1st view
  • Clicking the 2nd item creates and renders a new 2nd view
  • Clicking the 3rd item creates and renders a new 3rd view
  • Clicking the 1st item creates and renders a new 1st view
  • Clicking the 2nd item renders the existing 2nd view
  • Clicking the 3rd item renders the existing 3rd view
  • Clicking the 1st item renders the existing 1st view
  • Clicking the 2nd item renders the existing 2nd view
  • Clicking the 3rd item renders the existing 3rd view
  • Etc.
Obviously, the line in bold above should not create and render a new 1st view, but render the existing view.

Any ideas?

Thanks for your help!

Viewing all articles
Browse latest Browse all 1760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>