-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
UsableDuringInitializationAttribute.xml
141 lines (135 loc) · 9.46 KB
/
UsableDuringInitializationAttribute.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<Type Name="UsableDuringInitializationAttribute" FullName="System.Windows.Markup.UsableDuringInitializationAttribute">
<TypeSignature Language="C#" Value="public sealed class UsableDuringInitializationAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit UsableDuringInitializationAttribute extends System.Attribute" />
<TypeSignature Language="DocId" Value="T:System.Windows.Markup.UsableDuringInitializationAttribute" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class UsableDuringInitializationAttribute
Inherits Attribute" />
<TypeSignature Language="F#" Value="type UsableDuringInitializationAttribute = class
 inherit Attribute" />
<TypeSignature Language="C++ CLI" Value="public ref class UsableDuringInitializationAttribute sealed : Attribute" />
<AssemblyInfo>
<AssemblyName>System.Xaml</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="WindowsBase" FromVersion="4.0.0.0" To="System.Xaml" ToVersion="4.0.0.0" FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1" />
<TypeForwarding From="WindowsBase" FromVersion="5.0.0.0" To="System.Xaml" ToVersion="5.0.0.0" FrameworkAlternate="windowsdesktop-5.0" />
<TypeForwarding From="WindowsBase" FromVersion="6.0.0.0" To="System.Xaml" ToVersion="6.0.0.0" FrameworkAlternate="windowsdesktop-6.0" />
<TypeForwarding From="WindowsBase" FromVersion="7.0.0.0" To="System.Xaml" ToVersion="7.0.0.0" FrameworkAlternate="windowsdesktop-7.0" />
<TypeForwarding From="WindowsBase" FromVersion="8.0.0.0" To="System.Xaml" ToVersion="8.0.0.0" FrameworkAlternate="windowsdesktop-8.0" />
<TypeForwarding From="WindowsBase" FromVersion="9.0.0.0" To="System.Xaml" ToVersion="9.0.0.0" FrameworkAlternate="windowsdesktop-9.0" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Indicates whether this type is built top-down during XAML object graph creation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Top-down is a metaphor that approximates XAML processor behavior when creating the object graph. When built top-down, a class is instantiated, attached to the parent, and then has its properties set. Top-down construction avoids invoking property-changed handlers multiple times. Such handling will ripple up the object graph and therefore eliminating the multiple handler calls provides a performance optimization for startup of the object graph.
In previous versions of the .NET Framework, this class existed in the WPF-specific assembly WindowsBase. In .NET Framework 4, <xref:System.Windows.Markup.UsableDuringInitializationAttribute> is in the System.Xaml assembly. For more information, see [Types Migrated from WPF to System.Xaml](/dotnet/framework/xaml-services/types-migrated-from-wpf-to-system-xaml).
## WPF Usage Notes
In WPF XAML for .NET Framework 3.0 and .NET Framework 3.5, top-down construction was built in to the XAML processing for certain classes. The <xref:System.Windows.Markup.UsableDuringInitializationAttribute> attribute formalizes the reporting of the top-down behavior in .NET Framework 4.
]]></format>
</remarks>
<altmember cref="T:System.Windows.FrameworkElement" />
<related type="Article" href="/dotnet/desktop-wpf/xaml-services/clr-attributes-with-custom-types-and-libraries">XAML-related CLR attributes for custom types and libraries</related>
<related type="Article" href="/dotnet/desktop-wpf/xaml-services/define-custom-types">Define custom types for use with .NET XAML Services</related>
<related type="Article" href="/dotnet/desktop-wpf/xaml-services/">XAML Services</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UsableDuringInitializationAttribute (bool usable);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool usable) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Markup.UsableDuringInitializationAttribute.#ctor(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (usable As Boolean)" />
<MemberSignature Language="F#" Value="new System.Windows.Markup.UsableDuringInitializationAttribute : bool -> System.Windows.Markup.UsableDuringInitializationAttribute" Usage="new System.Windows.Markup.UsableDuringInitializationAttribute usable" />
<MemberSignature Language="C++ CLI" Value="public:
 UsableDuringInitializationAttribute(bool usable);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Xaml</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="usable" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="usable">Defines whether the associated class is usable during initialization.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Markup.UsableDuringInitializationAttribute" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This attribute inherits. For the initial application you would typically apply as `[UsableDuringInitialization(true)]`, but you could then set `[UsableDuringInitialization(false)]` on a derived class to change the derived class reporting of the behavior.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Usable">
<MemberSignature Language="C#" Value="public bool Usable { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Usable" />
<MemberSignature Language="DocId" Value="P:System.Windows.Markup.UsableDuringInitializationAttribute.Usable" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Usable As Boolean" />
<MemberSignature Language="F#" Value="member this.Usable : bool" Usage="System.Windows.Markup.UsableDuringInitializationAttribute.Usable" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool Usable { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Xaml</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether the associated class is usable during initialization.</summary>
<value>
<see langword="true" /> if the associated class is usable during initialization; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>