Tag Archives: icollectionview

Very simple MVVM demo application

The last couple of days, I’ve been busy writing an article about MVVM in French. I don’t know yet if I’ll translate it to English, but I’m sure I can share the demo application, and this is the goal of this post !

I think the best way to understand how things fit together is to explore the source code of the application.

It’s a very small demo because I wanted to demonstrate only a subset of MVVM facilities, so you’ll find:

  • an easy way to work with commands in MVVM using Josh Smith RelayCommand class
  • the power of the ICollectionView interface to implement navigation and search feature
  • empty code-behind file for my views
  • a base class for all my ViewModel objects (again, based on the work of Josh)

mvvm-demo-1

mvvm-demo-2

You can download the source code here. Enjoy :-)

Filtering with or without ICollectionView ?


Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/5/d143877862/htdocs/japf/wp-content/plugins/wp-codebox/main.php on line 31

Fatal error: Uncaught Error: Call to undefined function eregi() in /homepages/5/d143877862/htdocs/japf/wp-content/plugins/wp-codebox/main.php:136 Stack trace: #0 /homepages/5/d143877862/htdocs/japf/wp-content/plugins/wp-codebox/main.php(75): wp_codebox_is_windowsie() #1 /homepages/5/d143877862/htdocs/japf/wp-content/plugins/wp-codebox/main.php(50): wp_codebox_highlight_geshi(Array) #2 [internal function]: wp_codebox_highlight(Array) #3 /homepages/5/d143877862/htdocs/japf/wp-content/plugins/wp-codebox/main.php(130): preg_replace_callback('/<p>\\s*b462f0f5...', 'wp_codebox_high...', '<p>In my &#8220...') #4 /homepages/5/d143877862/htdocs/japf/wp-includes/plugin.php(213): wp_codebox_after_filter('<p>In my &#8220...') #5 /homepages/5/d143877862/htdocs/japf/wp-includes/post-template.php(221): apply_filters('the_content', '<p>In my &#8220...') #6 /homepages/5/d143877862/htdocs/japf/wp-content/themes/twentythirteen/content.php(39): the_content('Continue readin...') #7 /homepages/5/d143877862/htdocs/japf/wp-includes/template.php( in /homepages/5/d143877862/htdocs/japf/wp-content/plugins/wp-codebox/main.php on line 136