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