public : class FrameworkTemplate : DependencyObject, IFrameworkTemplate
public class FrameworkTemplate : DependencyObject, IFrameworkTemplate
Public Class FrameworkTemplate Inherits DependencyObject Implements IFrameworkTemplate
Windows 10 (introduced v10.0.10240.0)
Windows.Foundation.UniversalApiContract (introduced v1)
FrameworkTemplate has a ContentPropertyAttribute that indicates that its XAML content property is named "Template". FrameworkTemplate doesn't define a property of that name, nor do its derived types that have a practical usage (ControlTemplate, DataTemplate ). The content of a FrameworkTemplate is a root element that should be created when the template is applied to the object being templated, and isn't a conventional property in the object model. Content of a FrameworkTemplate is handled specially by the XAML parser when content is created from a template.
FrameworkTemplate derived classes
FrameworkTemplate is the parent class for several immediately derived classes that each define specific templating behavior. Here are some of the notable derived classes:
- ControlTemplate: this is used as the value of the Control.Template property, which defines the visuals of a control by applying the template. You almost always define a ControlTemplate as a XAML resource, using an implicit key TargetType that is the same as a Style that sets Control.Template with a Setter. You rarely if ever assign a value for Control.Template directly on a control instance.
- DataTemplate: specifies the visual representation of your data when it's supplying items for an items control, such as a ListView or GridView. A DataTemplate sets the ItemTemplate property for an items control. DataTemplate is also used for ContentControl.ContentTemplate and other control-specific data templating properties, such as various Header, HeaderTemplate, ContentTemplate and ItemTemplate properties on multiple classes.
- ItemsPanelTemplate: supports an alternative technique for representing data in the visuals of a control, by defining a layout container as well as parts within that container that present the data. ItemsPanelTemplate is used as the value of ItemsControl.ItemsPanel for items controls.