Class MarkupLoadScope
- Namespace
- Icy.Markup
- Assembly
- IcyUI.dll
An opaque handle to one observed load: one document, merged dictionary or template instantiation.
public sealed class MarkupLoadScope
- Inheritance
-
MarkupLoadScope
- Inherited Members
- Extension Methods
Remarks
A scope exists only while a LoadObserver is installed and observes the load's Kind. Without an observer the loader creates none, so ordinary loads pay nothing for this.
A scope never keeps the loaded tree alive: Root and NameScope are weak, and become null once the tree has been collected. Pass the scope back to IMarkupBuilder to build or update objects in the same document context.
Properties
Kind
Gets the kind of load this scope covers.
public MarkupLoadScopeKind Kind { get; }
Property Value
NameScope
Gets the name scope the load registers x:Names into, or null once the loaded tree
has been collected.
public MarkupNameScope? NameScope { get; }
Property Value
Root
Gets the root object the load produced, or null before it completes and after the root has been collected.
public object? Root { get; }
Property Value
SourcePath
Gets the path the document was loaded from, as passed to the loader, or null.
public string? SourcePath { get; }
Property Value
Remarks
Often an asset name resolved through an IAssetContext rather than a file path.
SourceText
Gets the exact text the loader parsed, without any byte order mark, or null for TemplateContent and DataTemplateContent scopes, which are built from an already-parsed element.
public string? SourceText { get; }