158 references to XmlToken
PresentationFramework (158)
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (143)
68s_xmlTokeFullNames = new Dictionary<XmlToken, string>(); 71foreach (XmlToken val in Enum.GetValues<XmlToken>()) 85_cachedXmlElements = new Dictionary<XmlToken, object>(); 106public static void UpdateAnnotation(XmlToken token, StickyNoteControl snc, SNCAnnotation sncAnnotation) 124if ((token & XmlToken.Ink) != 0 && snc.Content.Type == StickyNoteType.Ink) 126sncAnnotation.UpdateContent(snc, true, XmlToken.Ink); 130if ((token & XmlToken.Text) != 0 && snc.Content.Type == StickyNoteType.Text) 132sncAnnotation.UpdateContent(snc, true, XmlToken.Text); 158public static void UpdateStickyNoteControl(XmlToken token, StickyNoteControl snc, SNCAnnotation sncAnnotation) 172if ((token & XmlToken.Ink) != 0 && sncAnnotation.HasInkData) 174sncAnnotation.UpdateContent(snc, false, XmlToken.Ink); 178if ((token & XmlToken.Text) != 0 && sncAnnotation.HasTextData) 180sncAnnotation.UpdateContent(snc, false, XmlToken.Text); 184if ((token & XmlToken.Author) != 0) 207if ((token & XmlToken.Height) != 0) 209node = (XmlAttribute)sncAnnotation.FindData(XmlToken.Height); 222if ((token & XmlToken.Width) != 0) 224node = (XmlAttribute)sncAnnotation.FindData(XmlToken.Width); 237if ((token & XmlToken.IsExpanded) != 0) 239node = (XmlAttribute)sncAnnotation.FindData(XmlToken.IsExpanded); 252if ((token & XmlToken.ZOrder) != 0) 254node = (XmlAttribute)sncAnnotation.FindData(XmlToken.ZOrder); 265if ((token & XmlToken.Left) != 0) 267node = (XmlAttribute)sncAnnotation.FindData(XmlToken.Left); 285if ((token & XmlToken.Top) != 0) 287node = (XmlAttribute)sncAnnotation.FindData(XmlToken.Top); 296if ((token & XmlToken.XOffset) != 0) 298node = (XmlAttribute)sncAnnotation.FindData(XmlToken.XOffset); 305if ((token & XmlToken.YOffset) != 0) 307node = (XmlAttribute)sncAnnotation.FindData(XmlToken.YOffset); 331public const XmlToken AllValues = XmlToken.Left | XmlToken.Top | XmlToken.XOffset | XmlToken.YOffset | XmlToken.Width | XmlToken.Height 332| XmlToken.IsExpanded | XmlToken.Author 333| XmlToken.Text | XmlToken.Ink | XmlToken.ZOrder; 336public const XmlToken PositionValues = XmlToken.Left | XmlToken.Top | XmlToken.XOffset | XmlToken.YOffset; 338public const XmlToken Sizes = XmlToken.Left | XmlToken.Top | XmlToken.XOffset | XmlToken.YOffset | XmlToken.Width | XmlToken.Height; 340public const XmlToken AllContents = XmlToken.Text | XmlToken.Ink; 341public const XmlToken NegativeAllContents = AllValues ^ XmlToken.Text ^ XmlToken.Ink; 371return FindData(XmlToken.Ink) != null; 382return FindData(XmlToken.Text) != null; 417private object FindData(XmlToken token) 459SNCAnnotation annotation, XmlToken token, out AnnotationResource cargo, out XmlElement root, out bool newCargo, out bool newRoot) 462Invariant.Assert((token & (AllValues | XmlToken.MetaData)) != 0, "No token specified."); 502private void UpdateAttribute(XmlElement root, XmlToken token, string value) 528private static string GetXmlName(XmlToken token) 537private static void AddXmlTokenNames(XmlToken token) 546case XmlToken.MetaData: 547case XmlToken.Text: 548case XmlToken.Ink: 555case XmlToken.Left: 556case XmlToken.Top: 557case XmlToken.XOffset: 558case XmlToken.YOffset: 559case XmlToken.Width: 560case XmlToken.Height: 561case XmlToken.IsExpanded: 562case XmlToken.ZOrder: 576private static string GetCargoName(XmlToken token) 582case XmlToken.MetaData: 583case XmlToken.Left: 584case XmlToken.Top: 585case XmlToken.XOffset: 586case XmlToken.YOffset: 587case XmlToken.Width: 588case XmlToken.Height: 589case XmlToken.IsExpanded: 590case XmlToken.ZOrder: 596case XmlToken.Text: 601case XmlToken.Ink: 622private static XmlElement FindRootXmlElement(XmlToken token, AnnotationResource cargo) 632case XmlToken.Text: 633case XmlToken.Ink: 636case XmlToken.MetaData: 637case XmlToken.IsExpanded: 638case XmlToken.Width: 639case XmlToken.Height: 640case XmlToken.Top: 641case XmlToken.Left: 642case XmlToken.XOffset: 643case XmlToken.YOffset: 644case XmlToken.ZOrder: 645xmlName = GetXmlName(XmlToken.MetaData); 671private static object FindContent(XmlToken token, AnnotationResource cargo) 683case XmlToken.Text: 684case XmlToken.Ink: 686case XmlToken.IsExpanded: 687case XmlToken.ZOrder: 688case XmlToken.Top: 689case XmlToken.Left: 690case XmlToken.XOffset: 691case XmlToken.YOffset: 692case XmlToken.Width: 693case XmlToken.Height: 705private void UpdateContent(StickyNoteControl snc, bool updateAnnotation, XmlToken token) 719if ((token == XmlToken.Ink && contentControl.Type != StickyNoteType.Ink) 720|| (token == XmlToken.Text && contentControl.Type != StickyNoteType.Text)) 787private static void UpdateMetaData(XmlToken token, StickyNoteControl snc, SNCAnnotation sncAnnotation) 793GetCargoAndRoot(sncAnnotation, XmlToken.MetaData, out cargo, out root, out newCargo, out newRoot); 796if ((token & XmlToken.IsExpanded) != 0) 799sncAnnotation.UpdateAttribute(root, XmlToken.IsExpanded, expanded.ToString(CultureInfo.InvariantCulture)); 803if ((token & XmlToken.Height) != 0) 807sncAnnotation.UpdateAttribute(root, XmlToken.Height, height.ToString(CultureInfo.InvariantCulture)); 811if ((token & XmlToken.Width) != 0) 815sncAnnotation.UpdateAttribute(root, XmlToken.Width, width.ToString(CultureInfo.InvariantCulture)); 819if ((token & XmlToken.Left) != 0) 832sncAnnotation.UpdateAttribute(root, XmlToken.Left, left.ToString(CultureInfo.InvariantCulture)); 836if ((token & XmlToken.Top) != 0) 838sncAnnotation.UpdateAttribute(root, XmlToken.Top, snc.PositionTransform.Y.ToString(CultureInfo.InvariantCulture)); 842if ((token & XmlToken.XOffset) != 0) 844sncAnnotation.UpdateAttribute(root, XmlToken.XOffset, snc.XOffset.ToString(CultureInfo.InvariantCulture)); 848if ((token & XmlToken.YOffset) != 0) 850sncAnnotation.UpdateAttribute(root, XmlToken.YOffset, snc.YOffset.ToString(CultureInfo.InvariantCulture)); 854if ((token & XmlToken.ZOrder) != 0) 856sncAnnotation.UpdateAttribute(root, XmlToken.ZOrder, ((IAnnotationComponent)snc).ZOrder.ToString(CultureInfo.InvariantCulture)); 879private static Dictionary<XmlToken, string> s_xmlTokeFullNames; // A dictionary for the names of the xml elements 881private Dictionary<XmlToken, object> _cachedXmlElements; // A dictionary for caching the data object 1124UpdateAnnotationWithSNC(XmlToken.ZOrder); 1255UpdateSNCWithAnnotation(XmlToken.Author); 1426private void UpdateSNCWithAnnotation(XmlToken tokens) 1450private void UpdateAnnotationWithSNC(XmlToken tokens)
System\Windows\Controls\StickyNote.cs (15)
823AsyncUpdateAnnotation(XmlToken.Text); 980UpdateAnnotationWithSNC(XmlToken.Ink); 1052UpdateAnnotationWithSNC(XmlToken.XOffset | XmlToken.YOffset | XmlToken.Left | XmlToken.Top); 1057UpdateAnnotationWithSNC(XmlToken.XOffset | XmlToken.YOffset | XmlToken.Width | XmlToken.Height | XmlToken.Left | XmlToken.Top); 1310UpdateAnnotationWithSNC(XmlToken.IsExpanded); 1426UpdateAnnotationWithSNC((XmlToken)arg); 1961_snc.UpdateAnnotationWithSNC(XmlToken.Ink);