Assembly: System.Xaml (in System.Xaml.dll)
This method has a default implementation and returns a valid XamlReader. The returned XamlReader is an internal class that restricts certain XamlReader actions. The restrictions are consistent with the purpose of reading only a dimensioned subtree of a larger source for a XAML node set, and of returning end-of-file or nullptr at the current node when the subtree is exited.
Generally, you should check the current node from the initial Read to determine whether you need a subtree reader. How you check this may be implementation-specific; however, avoid creating multiple subtree readers for every subtree. In addition, avoid invoking a subtree reader for certain node cases (for example, for NamespaceDeclaration) that cannot contain a subtree of nodes.
After you obtain a subtree reader, you must call Read on it to obtain a current node (or call Skip to obtain a next node). You do not automatically obtain an initial node position from the subtree reader when you create it.
The reader you obtain by calling from this default implementation is an internal class. The internal class bases its behavior on the XamlReader implementation that is being used when is called. The purpose of the internal class is to wrap the Read and general traversal behavior. The traversal stays within the intended subtree by keeping track of StartMember/EndMember pairs or StartObject/EndObject pairs. It also correctly returns false for Read and true for IsEof when the reader is at the end of the subtree, as defined by its entry point. In general, you assume that any XamlReader API you call from a subtree reader has the same implementation as the overall XamlReader except for the traversal bounding behavior.
However, is virtual. Therefore, a specific XamlReader implementation can provide behavior that differs from the XamlReader internal wrapper behavior; and a XamlReader implementation can even disable subtree reader functionality by returning NotImplementedException or other exceptions.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.