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