private void References_Changed(object sender, SceneNode pathNode, AnnotationEditor.ReferenceInfo info, DocumentNodeMarker damageMarker, DocumentNodeChange damage) { IEnumerable <string> enumerable = AnnotationUtils.ParseAnnotationReferences(((DocumentPrimitiveNode)pathNode.DocumentNode).GetValue <string>()); info.ReferencedAnnotationIds = Enumerable.ToList <string>(enumerable); info.ReferencedAnnotations = this.ComputeReferencedAnnotations(enumerable); this.InvalidateAdorners(info.ReferenceOwner); }
private AnnotationEditor.ReferenceInfo References_InsertedHandler(object sender, SceneNode basisNode, object basisContent, SceneNode newPathNode) { SceneElement sceneElement = (SceneElement)newPathNode.Parent; IEnumerable <string> enumerable = AnnotationUtils.ParseAnnotationReferences(((DocumentPrimitiveNode)newPathNode.DocumentNode).GetValue <string>()); return(new AnnotationEditor.ReferenceInfo() { ReferenceOwner = sceneElement, ReferencedAnnotationIds = Enumerable.ToList <string>(enumerable), ReferencedAnnotations = this.ComputeReferencedAnnotations(enumerable) }); }
public static IEnumerable <string> GetReferencedAnnotationIds(SceneElement element) { ExceptionChecks.CheckNullArgument <SceneElement>(element, "element"); return(AnnotationUtils.ParseAnnotationReferences(element.GetLocalOrDefaultValue(AnnotationSceneNode.ReferencesProperty) as string ?? string.Empty)); }