C# Class Microsoft.Practices.Prism.ViewModel.DataTemplateSelector

This custom ContentControl changes its ContentTemplate based on the content it is presenting.
In order to determine the template it must use for the new content, this control retrieves it from its resources using the name for the type of the new content as the key.
Inheritance: System.Windows.Controls.ContentControl
Exibir arquivo Open project: jeffras/Prism-4-with-WinForms Class Usage Examples

Protected Methods

Method Description
OnContentChanged ( object oldContent, object newContent ) : void

Called when the value of the P:System.Windows.Controls.ContentControl.Content property changes.

Will attempt to discover the DataTemplate from the ResourceDictionary by matching the type name of newContent.

Private Methods

Method Description
GetDefaultContentTemplate ( ) : System.Windows.DataTemplate

Method Details

OnContentChanged() protected method

Called when the value of the P:System.Windows.Controls.ContentControl.Content property changes.
Will attempt to discover the DataTemplate from the ResourceDictionary by matching the type name of newContent.
protected OnContentChanged ( object oldContent, object newContent ) : void
oldContent object The old value of the property.
newContent object The new value of the property.
return void