Represents an attribute that is applied to the class definition to identify the types of the named parts that are used for templating.
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := True)> _ Public NotInheritable Class TemplatePartAttribute _ Inherits Attribute
Dim instance As TemplatePartAttribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true)] public sealed class TemplatePartAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = true)] public ref class TemplatePartAttribute sealed : public Attribute
public final class TemplatePartAttribute extends Attribute
You cannot use this class or its properties in XAML.
Control authors apply this attribute to the class definition to inform template authors the types of the parts to use for styling the class. These parts are usually required in the template and have a specific predefined name. There can only be one element with a given name in any template.
For example, if you look at the class declaration of the ComboBox class, you can see that the parts PART_EditableTextBox and PART_Popup are of types TextBox and Popup respectively.
For more information, see Guidelines for Designing Stylable Controls
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003