private static void UpdateSourceContextRangeFromInitialRangeWorker(IReadableSelectableTextBuffer textBuffer, DocumentNode node, int offset) { node.ClearOldSourceContainerContext(); XamlSerializerUtilities.UpdateSourceContextRangeFromInitialRange(textBuffer, node.SourceContext, offset); XamlSerializerUtilities.UpdateSourceContextRangeFromInitialRange(textBuffer, node.ContainerSourceContext, offset); foreach (DocumentNode node1 in node.ChildNodes) { XamlSerializerUtilities.UpdateSourceContextRangeFromInitialRangeWorker(textBuffer, node1, offset); } }
public static void PrepareNodeForTextDeletion(IDocumentRoot documentRoot, DocumentNode node) { node.ClearOldSourceContainerContext(); DocumentNodeHelper.PreserveFormatting(documentRoot, node); }