158 references to XmlToken
PresentationFramework (158)
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (143)
78s_xmlTokeFullNames = new Dictionary<XmlToken, string>(); 81foreach (XmlToken val in Enum.GetValues<XmlToken>()) 95_cachedXmlElements = new Dictionary<XmlToken, object>(); 116public static void UpdateAnnotation(XmlToken token, StickyNoteControl snc, SNCAnnotation sncAnnotation) 134if ((token & XmlToken.Ink) != 0 && snc.Content.Type == StickyNoteType.Ink) 136sncAnnotation.UpdateContent(snc, true, XmlToken.Ink); 140if ((token & XmlToken.Text) != 0 && snc.Content.Type == StickyNoteType.Text) 142sncAnnotation.UpdateContent(snc, true, XmlToken.Text); 168public static void UpdateStickyNoteControl(XmlToken token, StickyNoteControl snc, SNCAnnotation sncAnnotation) 182if ((token & XmlToken.Ink) != 0 && sncAnnotation.HasInkData) 184sncAnnotation.UpdateContent(snc, false, XmlToken.Ink); 188if ((token & XmlToken.Text) != 0 && sncAnnotation.HasTextData) 190sncAnnotation.UpdateContent(snc, false, XmlToken.Text); 194if ((token & XmlToken.Author) != 0) 217if ((token & XmlToken.Height) != 0) 219node = (XmlAttribute)sncAnnotation.FindData(XmlToken.Height); 232if ((token & XmlToken.Width) != 0) 234node = (XmlAttribute)sncAnnotation.FindData(XmlToken.Width); 247if ((token & XmlToken.IsExpanded) != 0) 249node = (XmlAttribute)sncAnnotation.FindData(XmlToken.IsExpanded); 262if ((token & XmlToken.ZOrder) != 0) 264node = (XmlAttribute)sncAnnotation.FindData(XmlToken.ZOrder); 275if ((token & XmlToken.Left) != 0) 277node = (XmlAttribute)sncAnnotation.FindData(XmlToken.Left); 295if ((token & XmlToken.Top) != 0) 297node = (XmlAttribute)sncAnnotation.FindData(XmlToken.Top); 306if ((token & XmlToken.XOffset) != 0) 308node = (XmlAttribute)sncAnnotation.FindData(XmlToken.XOffset); 315if ((token & XmlToken.YOffset) != 0) 317node = (XmlAttribute)sncAnnotation.FindData(XmlToken.YOffset); 341public const XmlToken AllValues = XmlToken.Left | XmlToken.Top | XmlToken.XOffset | XmlToken.YOffset | XmlToken.Width | XmlToken.Height 342| XmlToken.IsExpanded | XmlToken.Author 343| XmlToken.Text | XmlToken.Ink | XmlToken.ZOrder; 346public const XmlToken PositionValues = XmlToken.Left | XmlToken.Top | XmlToken.XOffset | XmlToken.YOffset; 348public const XmlToken Sizes = XmlToken.Left | XmlToken.Top | XmlToken.XOffset | XmlToken.YOffset | XmlToken.Width | XmlToken.Height; 350public const XmlToken AllContents = XmlToken.Text | XmlToken.Ink; 351public const XmlToken NegativeAllContents = AllValues ^ XmlToken.Text ^ XmlToken.Ink; 381return FindData(XmlToken.Ink) != null; 392return FindData(XmlToken.Text) != null; 427private object FindData(XmlToken token) 469SNCAnnotation annotation, XmlToken token, out AnnotationResource cargo, out XmlElement root, out bool newCargo, out bool newRoot) 472Invariant.Assert((token & (AllValues | XmlToken.MetaData)) != 0, "No token specified."); 512private void UpdateAttribute(XmlElement root, XmlToken token, string value) 538private static string GetXmlName(XmlToken token) 547private static void AddXmlTokenNames(XmlToken token) 556case XmlToken.MetaData: 557case XmlToken.Text: 558case XmlToken.Ink: 565case XmlToken.Left: 566case XmlToken.Top: 567case XmlToken.XOffset: 568case XmlToken.YOffset: 569case XmlToken.Width: 570case XmlToken.Height: 571case XmlToken.IsExpanded: 572case XmlToken.ZOrder: 586private static string GetCargoName(XmlToken token) 592case XmlToken.MetaData: 593case XmlToken.Left: 594case XmlToken.Top: 595case XmlToken.XOffset: 596case XmlToken.YOffset: 597case XmlToken.Width: 598case XmlToken.Height: 599case XmlToken.IsExpanded: 600case XmlToken.ZOrder: 606case XmlToken.Text: 611case XmlToken.Ink: 632private static XmlElement FindRootXmlElement(XmlToken token, AnnotationResource cargo) 642case XmlToken.Text: 643case XmlToken.Ink: 646case XmlToken.MetaData: 647case XmlToken.IsExpanded: 648case XmlToken.Width: 649case XmlToken.Height: 650case XmlToken.Top: 651case XmlToken.Left: 652case XmlToken.XOffset: 653case XmlToken.YOffset: 654case XmlToken.ZOrder: 655xmlName = GetXmlName(XmlToken.MetaData); 681private static object FindContent(XmlToken token, AnnotationResource cargo) 693case XmlToken.Text: 694case XmlToken.Ink: 696case XmlToken.IsExpanded: 697case XmlToken.ZOrder: 698case XmlToken.Top: 699case XmlToken.Left: 700case XmlToken.XOffset: 701case XmlToken.YOffset: 702case XmlToken.Width: 703case XmlToken.Height: 715private void UpdateContent(StickyNoteControl snc, bool updateAnnotation, XmlToken token) 729if ((token == XmlToken.Ink && contentControl.Type != StickyNoteType.Ink) 730|| (token == XmlToken.Text && contentControl.Type != StickyNoteType.Text)) 797private static void UpdateMetaData(XmlToken token, StickyNoteControl snc, SNCAnnotation sncAnnotation) 803GetCargoAndRoot(sncAnnotation, XmlToken.MetaData, out cargo, out root, out newCargo, out newRoot); 806if ((token & XmlToken.IsExpanded) != 0) 809sncAnnotation.UpdateAttribute(root, XmlToken.IsExpanded, expanded.ToString(CultureInfo.InvariantCulture)); 813if ((token & XmlToken.Height) != 0) 817sncAnnotation.UpdateAttribute(root, XmlToken.Height, height.ToString(CultureInfo.InvariantCulture)); 821if ((token & XmlToken.Width) != 0) 825sncAnnotation.UpdateAttribute(root, XmlToken.Width, width.ToString(CultureInfo.InvariantCulture)); 829if ((token & XmlToken.Left) != 0) 842sncAnnotation.UpdateAttribute(root, XmlToken.Left, left.ToString(CultureInfo.InvariantCulture)); 846if ((token & XmlToken.Top) != 0) 848sncAnnotation.UpdateAttribute(root, XmlToken.Top, snc.PositionTransform.Y.ToString(CultureInfo.InvariantCulture)); 852if ((token & XmlToken.XOffset) != 0) 854sncAnnotation.UpdateAttribute(root, XmlToken.XOffset, snc.XOffset.ToString(CultureInfo.InvariantCulture)); 858if ((token & XmlToken.YOffset) != 0) 860sncAnnotation.UpdateAttribute(root, XmlToken.YOffset, snc.YOffset.ToString(CultureInfo.InvariantCulture)); 864if ((token & XmlToken.ZOrder) != 0) 866sncAnnotation.UpdateAttribute(root, XmlToken.ZOrder, ((IAnnotationComponent)snc).ZOrder.ToString(CultureInfo.InvariantCulture)); 889private static Dictionary<XmlToken, string> s_xmlTokeFullNames; // A dictionary for the names of the xml elements 891private Dictionary<XmlToken, object> _cachedXmlElements; // A dictionary for caching the data object 1134UpdateAnnotationWithSNC(XmlToken.ZOrder); 1265UpdateSNCWithAnnotation(XmlToken.Author); 1436private void UpdateSNCWithAnnotation(XmlToken tokens) 1460private void UpdateAnnotationWithSNC(XmlToken tokens)
System\Windows\Controls\StickyNote.cs (15)
850AsyncUpdateAnnotation(XmlToken.Text); 1007UpdateAnnotationWithSNC(XmlToken.Ink); 1079UpdateAnnotationWithSNC(XmlToken.XOffset | XmlToken.YOffset | XmlToken.Left | XmlToken.Top); 1084UpdateAnnotationWithSNC(XmlToken.XOffset | XmlToken.YOffset | XmlToken.Width | XmlToken.Height | XmlToken.Left | XmlToken.Top); 1337UpdateAnnotationWithSNC(XmlToken.IsExpanded); 1453UpdateAnnotationWithSNC((XmlToken)arg); 1976_snc.UpdateAnnotationWithSNC(XmlToken.Ink);