Share via


DataTemplateSelector Class

This custom ContentControl changes its ContentTemplate based on the content it is presenting.

Namespace:  Microsoft.Practices.Prism.ViewModel
Assembly:  Microsoft.Practices.Prism (in Microsoft.Practices.Prism.dll)

Syntax

public class DataTemplateSelector : ContentControl
'Declaration
Public Class DataTemplateSelector _
    Inherits ContentControl

Remarks

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 Hierarchy

System.Object
  System.Windows.DependencyObject
    System.Windows.UIElement
      System.Windows.FrameworkElement
        System.Windows.Controls.Control
          System.Windows.Controls.ContentControl
            Microsoft.Practices.Prism.ViewModel.DataTemplateSelector

See Also

DataTemplateSelector Members

Microsoft.Practices.Prism.ViewModel Namespace