XamlType.LookupUsableDuringInitialization Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a value that indicates whether this XamlType is built top-down during XAML initialization.
protected:
virtual bool LookupUsableDuringInitialization();
protected virtual bool LookupUsableDuringInitialization();
abstract member LookupUsableDuringInitialization : unit -> bool
override this.LookupUsableDuringInitialization : unit -> bool
Protected Overridable Function LookupUsableDuringInitialization () As Boolean
true
if this XamlType is built top-down during XAML initialization; otherwise, false
.
Top-down is a metaphor that approximates XAML processor behavior when it creates the object graph. When built top-down, a type is instantiated, attached to the parent, and has its properties set. Top-down construction avoids invoking property-changed handlers multiple times. Such handling ripples up the object graph and therefore, eliminates the multiple handler calls and provides a performance optimization for startup of the object graph.
This method can be invoked by calls to IsUsableDuringInitialization.
The default implementation returns a value based on reading UsableDuringInitializationAttribute. It can also check BaseType for the attribute if no attribute is found on the immediate underlying type. If a value is unavailable, it returns false
.
Override this method if you want IsUsableDuringInitialization to use different logic.
Product | Versions |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: