Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
147 lines (136 sloc) 7.61 KB
<Type Name="TemplatePartAttribute" FullName="System.Windows.TemplatePartAttribute">
<TypeSignature Language="C#" Value="public sealed class TemplatePartAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit TemplatePartAttribute extends System.Attribute" />
<TypeSignature Language="DocId" Value="T:System.Windows.TemplatePartAttribute" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class TemplatePartAttribute&#xA;Inherits Attribute" />
<TypeSignature Language="C++ CLI" Value="public ref class TemplatePartAttribute sealed : Attribute" />
<TypeSignature Language="F#" Value="type TemplatePartAttribute = class&#xA; inherit Attribute" />
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents an attribute that is applied to the class definition to identify the types of the named parts that are used for templating.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
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 <xref:System.Windows.Controls.ComboBox> class, you can see that the parts `PART_EditableTextBox` and `PART_Popup` are of types <xref:System.Windows.Controls.TextBox> and <xref:System.Windows.Controls.Primitives.Popup> respectively.
For more information, see [Guidelines for Designing Stylable Controls](~/docs/framework/wpf/controls/guidelines-for-designing-stylable-controls.md)
<a name="xamlTextUsage_TemplatePartAttribute"></a>
## XAML Text Usage
You cannot use this class or its properties in [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)].
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/attributes/index.md">Extending Metadata Using Attributes</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public TemplatePartAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.TemplatePartAttribute.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; TemplatePartAttribute();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.TemplatePartAttribute" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Name">
<MemberSignature Language="C#" Value="public string Name { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Name" />
<MemberSignature Language="DocId" Value="P:System.Windows.TemplatePartAttribute.Name" />
<MemberSignature Language="VB.NET" Value="Public Property Name As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.Name : string with get, set" Usage="System.Windows.TemplatePartAttribute.Name" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the pre-defined name of the part.</summary>
<value>The pre-defined name of the part.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<a name="xamlTextUsage_Name"></a>
## XAML Text Usage
You cannot use this property in [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)].
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Type">
<MemberSignature Language="C#" Value="public Type Type { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type Type" />
<MemberSignature Language="DocId" Value="P:System.Windows.TemplatePartAttribute.Type" />
<MemberSignature Language="VB.NET" Value="Public Property Type As Type" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property Type ^ Type { Type ^ get(); void set(Type ^ value); };" />
<MemberSignature Language="F#" Value="member this.Type : Type with get, set" Usage="System.Windows.TemplatePartAttribute.Type" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the type of the named part this attribute is identifying.</summary>
<value>The type of the named part this attribute is identifying.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<a name="xamlTextUsage_Type"></a>
## XAML Text Usage
You cannot use this property in [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)].
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.