Wpf contentcontrol binding not updating

On this screen you can click a button for each user to edit that user in the list. Each button takes you to the User Detail screen where you can edit, delete, or create a new user.In the case of creating a new user or deleting a user, when navigating back to the User List View screen, a new User List View Model is instantiated, which makes a new call to the database to get the changes just made.

wpf contentcontrol binding not updating-1wpf contentcontrol binding not updating-61

Wpf contentcontrol binding not updating www cherryblossoms com online dating

For example if in User List View, I click Add New User button, am taken to User Detail View, add details for a new User, click save, then navigate back to User List View - the newly created user is not in the view.

Note that I have debugged, and can confirm that the View Model has the correct data.

Well, if you used Content Presenters in your User Control, you would see this, instead: You would also see strange binding errors in the console System. Data Error: 40 : Binding Expression path error: 'Content Two Template' property not found on 'object' ''String' (Hash Code=-1506748533)'.

Binding Expression: Path=Content Two Template; Data Item='String' (Hash Code=-1506748533); target element is 'Content Presenter' (Name=''); target property is 'Content Template' (type 'Data Template') System. Data Error: 40 : Binding Expression path error: 'Content Two Template Selector' property not found on 'object' ''String' (Hash Code=-1506748533)'.

Setup the main dialog When I need quick prototypes, I often don’t use Blend and type the XAML directly into Visual Studio editor.

That was the very first part I did to write this XAML: .

A quick post here about using a Content Presenter (or a Content Control which uses a Content Presenter in its template) with its Content property.

The intended usage of Content Presenter is to set the Content to some binding to a data object, then control the element tree via the Content Template property.

Binding Expression: Path=Content One Template Selector; Data Item='String' (Hash Code=-694847); target element is 'Content Presenter' (Name=''); target property is 'Content Template Selector' (type 'Data Template Selector') Notice that for some reason the Content One Template, Content One Template Selector, Content Two Template and Content Two Template Selector are bound to an object of type ‘String’. Because the moment you sent the Content Property of the Content Presenter its Data Context was switch to match the value of the Content property.


  1. Our online chat rooms are very easy to use, you just have to enter a random nick name and you are in. Our Desi Chat Room is the best chat room for Indians.

  2. In the museum’s collection, discoveries made during the exploration of the Bandužiai burial ground are stored.

  3. You can use it like any other social networking site.

  4. Beginning in 2007, she played the character of Jenny Humphrey in The CW television series Gossip Girl, which is based on the book series by Cecily von Ziegesar.

  5. Good and Stewart's characters, Gabby and Nell, prepare for the challenge of finding "the one" and embark on a coveted "10th date" journey.

Comments are closed.