158 references to XmlToken
PresentationFramework (158)
src\Framework\MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (143)
84
s_xmlTokeFullNames = new Dictionary<
XmlToken
, string>();
87
foreach (
XmlToken
val in Enum.GetValues(typeof(
XmlToken
)))
101
_cachedXmlElements = new Dictionary<
XmlToken
, object>();
122
public static void UpdateAnnotation(
XmlToken
token, StickyNoteControl snc, SNCAnnotation sncAnnotation)
140
if ((token &
XmlToken
.Ink) != 0 && snc.Content.Type == StickyNoteType.Ink)
142
sncAnnotation.UpdateContent(snc, true,
XmlToken
.Ink);
146
if ((token &
XmlToken
.Text) != 0 && snc.Content.Type == StickyNoteType.Text)
148
sncAnnotation.UpdateContent(snc, true,
XmlToken
.Text);
174
public static void UpdateStickyNoteControl(
XmlToken
token, StickyNoteControl snc, SNCAnnotation sncAnnotation)
188
if ((token &
XmlToken
.Ink) != 0 && sncAnnotation.HasInkData)
190
sncAnnotation.UpdateContent(snc, false,
XmlToken
.Ink);
194
if ((token &
XmlToken
.Text) != 0 && sncAnnotation.HasTextData)
196
sncAnnotation.UpdateContent(snc, false,
XmlToken
.Text);
200
if ((token &
XmlToken
.Author) != 0)
223
if ((token &
XmlToken
.Height) != 0)
225
node = (XmlAttribute)sncAnnotation.FindData(
XmlToken
.Height);
238
if ((token &
XmlToken
.Width) != 0)
240
node = (XmlAttribute)sncAnnotation.FindData(
XmlToken
.Width);
253
if ((token &
XmlToken
.IsExpanded) != 0)
255
node = (XmlAttribute)sncAnnotation.FindData(
XmlToken
.IsExpanded);
268
if ((token &
XmlToken
.ZOrder) != 0)
270
node = (XmlAttribute)sncAnnotation.FindData(
XmlToken
.ZOrder);
281
if ((token &
XmlToken
.Left) != 0)
283
node = (XmlAttribute)sncAnnotation.FindData(
XmlToken
.Left);
301
if ((token &
XmlToken
.Top) != 0)
303
node = (XmlAttribute)sncAnnotation.FindData(
XmlToken
.Top);
312
if ((token &
XmlToken
.XOffset) != 0)
314
node = (XmlAttribute)sncAnnotation.FindData(
XmlToken
.XOffset);
321
if ((token &
XmlToken
.YOffset) != 0)
323
node = (XmlAttribute)sncAnnotation.FindData(
XmlToken
.YOffset);
347
public const
XmlToken
AllValues =
XmlToken
.Left |
XmlToken
.Top |
XmlToken
.XOffset |
XmlToken
.YOffset |
XmlToken
.Width |
XmlToken
.Height
348
|
XmlToken
.IsExpanded |
XmlToken
.Author
349
|
XmlToken
.Text |
XmlToken
.Ink |
XmlToken
.ZOrder;
352
public const
XmlToken
PositionValues =
XmlToken
.Left |
XmlToken
.Top |
XmlToken
.XOffset |
XmlToken
.YOffset;
354
public const
XmlToken
Sizes =
XmlToken
.Left |
XmlToken
.Top |
XmlToken
.XOffset |
XmlToken
.YOffset |
XmlToken
.Width |
XmlToken
.Height;
356
public const
XmlToken
AllContents =
XmlToken
.Text |
XmlToken
.Ink;
357
public const
XmlToken
NegativeAllContents = AllValues ^
XmlToken
.Text ^
XmlToken
.Ink;
387
return FindData(
XmlToken
.Ink) != null;
398
return FindData(
XmlToken
.Text) != null;
433
private object FindData(
XmlToken
token)
475
SNCAnnotation annotation,
XmlToken
token, out AnnotationResource cargo, out XmlElement root, out bool newCargo, out bool newRoot)
478
Invariant.Assert((token & (AllValues |
XmlToken
.MetaData)) != 0, "No token specified.");
518
private void UpdateAttribute(XmlElement root,
XmlToken
token, string value)
544
private static string GetXmlName(
XmlToken
token)
553
private static void AddXmlTokenNames(
XmlToken
token)
562
case
XmlToken
.MetaData:
563
case
XmlToken
.Text:
564
case
XmlToken
.Ink:
571
case
XmlToken
.Left:
572
case
XmlToken
.Top:
573
case
XmlToken
.XOffset:
574
case
XmlToken
.YOffset:
575
case
XmlToken
.Width:
576
case
XmlToken
.Height:
577
case
XmlToken
.IsExpanded:
578
case
XmlToken
.ZOrder:
592
private static string GetCargoName(
XmlToken
token)
598
case
XmlToken
.MetaData:
599
case
XmlToken
.Left:
600
case
XmlToken
.Top:
601
case
XmlToken
.XOffset:
602
case
XmlToken
.YOffset:
603
case
XmlToken
.Width:
604
case
XmlToken
.Height:
605
case
XmlToken
.IsExpanded:
606
case
XmlToken
.ZOrder:
612
case
XmlToken
.Text:
617
case
XmlToken
.Ink:
638
private static XmlElement FindRootXmlElement(
XmlToken
token, AnnotationResource cargo)
648
case
XmlToken
.Text:
649
case
XmlToken
.Ink:
652
case
XmlToken
.MetaData:
653
case
XmlToken
.IsExpanded:
654
case
XmlToken
.Width:
655
case
XmlToken
.Height:
656
case
XmlToken
.Top:
657
case
XmlToken
.Left:
658
case
XmlToken
.XOffset:
659
case
XmlToken
.YOffset:
660
case
XmlToken
.ZOrder:
661
xmlName = GetXmlName(
XmlToken
.MetaData);
687
private static object FindContent(
XmlToken
token, AnnotationResource cargo)
699
case
XmlToken
.Text:
700
case
XmlToken
.Ink:
702
case
XmlToken
.IsExpanded:
703
case
XmlToken
.ZOrder:
704
case
XmlToken
.Top:
705
case
XmlToken
.Left:
706
case
XmlToken
.XOffset:
707
case
XmlToken
.YOffset:
708
case
XmlToken
.Width:
709
case
XmlToken
.Height:
722
private void UpdateContent(StickyNoteControl snc, bool updateAnnotation,
XmlToken
token)
736
if ((token ==
XmlToken
.Ink && contentControl.Type != StickyNoteType.Ink)
737
|| (token ==
XmlToken
.Text && contentControl.Type != StickyNoteType.Text))
804
private static void UpdateMetaData(
XmlToken
token, StickyNoteControl snc, SNCAnnotation sncAnnotation)
810
GetCargoAndRoot(sncAnnotation,
XmlToken
.MetaData, out cargo, out root, out newCargo, out newRoot);
813
if ((token &
XmlToken
.IsExpanded) != 0)
816
sncAnnotation.UpdateAttribute(root,
XmlToken
.IsExpanded, expanded.ToString(CultureInfo.InvariantCulture));
820
if ((token &
XmlToken
.Height) != 0)
824
sncAnnotation.UpdateAttribute(root,
XmlToken
.Height, height.ToString(CultureInfo.InvariantCulture));
828
if ((token &
XmlToken
.Width) != 0)
832
sncAnnotation.UpdateAttribute(root,
XmlToken
.Width, width.ToString(CultureInfo.InvariantCulture));
836
if ((token &
XmlToken
.Left) != 0)
849
sncAnnotation.UpdateAttribute(root,
XmlToken
.Left, left.ToString(CultureInfo.InvariantCulture));
853
if ((token &
XmlToken
.Top) != 0)
855
sncAnnotation.UpdateAttribute(root,
XmlToken
.Top, snc.PositionTransform.Y.ToString(CultureInfo.InvariantCulture));
859
if ((token &
XmlToken
.XOffset) != 0)
861
sncAnnotation.UpdateAttribute(root,
XmlToken
.XOffset, snc.XOffset.ToString(CultureInfo.InvariantCulture));
865
if ((token &
XmlToken
.YOffset) != 0)
867
sncAnnotation.UpdateAttribute(root,
XmlToken
.YOffset, snc.YOffset.ToString(CultureInfo.InvariantCulture));
871
if ((token &
XmlToken
.ZOrder) != 0)
873
sncAnnotation.UpdateAttribute(root,
XmlToken
.ZOrder, ((IAnnotationComponent)snc).ZOrder.ToString(CultureInfo.InvariantCulture));
896
private static Dictionary<
XmlToken
, string> s_xmlTokeFullNames; // A dictionary for the names of the xml elements
898
private Dictionary<
XmlToken
, object> _cachedXmlElements; // A dictionary for caching the data object
1149
UpdateAnnotationWithSNC(
XmlToken
.ZOrder);
1280
UpdateSNCWithAnnotation(
XmlToken
.Author);
1452
private void UpdateSNCWithAnnotation(
XmlToken
tokens)
1476
private void UpdateAnnotationWithSNC(
XmlToken
tokens)
src\Framework\System\Windows\Controls\StickyNote.cs (15)
860
AsyncUpdateAnnotation(
XmlToken
.Text);
1017
UpdateAnnotationWithSNC(
XmlToken
.Ink);
1089
UpdateAnnotationWithSNC(
XmlToken
.XOffset |
XmlToken
.YOffset |
XmlToken
.Left |
XmlToken
.Top);
1094
UpdateAnnotationWithSNC(
XmlToken
.XOffset |
XmlToken
.YOffset |
XmlToken
.Width |
XmlToken
.Height |
XmlToken
.Left |
XmlToken
.Top);
1347
UpdateAnnotationWithSNC(
XmlToken
.IsExpanded);
1463
UpdateAnnotationWithSNC((
XmlToken
)arg);
2013
_snc.UpdateAnnotationWithSNC(
XmlToken
.Ink);