187 references to TextSchema
PresentationFramework (187)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (1)
800
!
TextSchema
.IsFormattingType(pointer.ParentType))
System\Windows\Controls\RichTextBox.cs (6)
635
DependencyProperty[] inheritableFormattingProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
643
DependencyProperty[] inheritableBehavioralProperties =
TextSchema
.BehavioralProperties;
662
DependencyProperty[] inheritableFormattingProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
676
DependencyProperty[] inheritableBehavioralProperties =
TextSchema
.BehavioralProperties;
704
if (!
TextSchema
.ValuesAreEqual(inheritedValue, defaultValue))
708
if (!
TextSchema
.ValuesAreEqual(inheritedValue, defaultValue))
System\Windows\Controls\TextBlock.cs (1)
137
if (!
TextSchema
.IsValidChildOfContainer(parentType, /*childType*/valueType))
System\Windows\Documents\FixedTextView.cs (1)
1193
while (
TextSchema
.IsFormattingType( textPointer.GetElementType(dir)) )
System\Windows\Documents\FlowDocument.cs (1)
1627
if (!
TextSchema
.IsValidChildOfContainer(/*parentType:*/_typeofThis, /*childType:*/value.GetType()))
System\Windows\Documents\InlineCollection.cs (2)
161
TextSchema
.ValidateChild((TextElement)this.Parent, child, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
165
if (!
TextSchema
.IsValidChildOfContainer(this.Parent.GetType(), child.GetType()))
System\Windows\Documents\Span.cs (1)
144
Invariant.Assert(
TextSchema
.IsValidChild(/*position*/start, /*childType*/typeof(Span)));
System\Windows\Documents\Speller.cs (2)
1802
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
1807
TextSchema
.IsFormattingType(pointer.ParentType))
System\windows\Documents\TextEditorCharacters.cs (4)
74
if (!
TextSchema
.IsParagraphProperty(formattingProperty) && !
TextSchema
.IsCharacterProperty(formattingProperty))
82
if (
TextSchema
.IsStructuralCharacterProperty(formattingProperty) &&
220
if (!
TextSchema
.HasTextDecorations(textDecorations))
System\windows\Documents\TextEditorSelection.cs (1)
2023
while (
TextSchema
.IsFormattingType(position.ParentType))
System\windows\Documents\TextEditorSpelling.cs (1)
273
if (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
System\windows\Documents\TextEditorTyping.cs (4)
809
if (
TextSchema
.IsBlock(parentType))
811
if (
TextSchema
.IsParagraphOrBlockUIContainer(parentType))
855
TextSchema
.IsParagraphOrBlockUIContainer(navigator.ParentType)))
1879
TextSchema
.HasHyperlinkAncestor((TextElement)pointer.Parent))
System\Windows\Documents\TextElement.cs (4)
795
TextSchema
.ValidateChild(/*parent:*/this, /*child:*/te, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
827
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(InlineUIContainer)))
861
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(string)))
868
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(Run)))
System\Windows\Documents\TextFindEngine.cs (4)
898
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
903
TextSchema
.IsFormattingType(pointer.ParentType))
913
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Backward)))
918
TextSchema
.IsFormattingType(pointer.ParentType))
System\Windows\Documents\TextPointer.cs (7)
1278
if (
TextSchema
.IsInTextContent(this))
1318
if (!
TextSchema
.IsInTextContent(this))
1420
if (!
TextSchema
.IsValidChildOfContainer(containerType, typeof(Paragraph)))
1613
TextSchema
.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType()))
1723
while (ancestor != null &&
TextSchema
.IsMergeableInline(ancestor.GetType()))
3540
bool isValidChild =
TextSchema
.ValidateChild(position, /*childType*/inline.GetType(), false /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
3567
Invariant.Assert(
TextSchema
.IsValidChild(position, /*childType*/inline.GetType()));
System\Windows\Documents\TextPointerBase.cs (20)
179
if (
TextSchema
.IsValidChild(/*position*/backwardPosition, /*childType*/typeof(Run)))
192
backwardContext == TextPointerContext.ElementStart &&
TextSchema
.IsNonFormattingInline(forwardType) &&
196
forwardContext == TextPointerContext.ElementEnd &&
TextSchema
.IsNonFormattingInline(backwardType) &&
201
TextSchema
.IsNonFormattingInline(backwardType) &&
TextSchema
.IsNonFormattingInline(forwardType)
205
typeof(Inline).IsAssignableFrom(backwardType) && !
TextSchema
.IsMergeableInline(backwardType) && !typeof(Run).IsAssignableFrom(forwardType) &&
209
typeof(Inline).IsAssignableFrom(forwardType) && !
TextSchema
.IsMergeableInline(forwardType) && !typeof(Run).IsAssignableFrom(backwardType) &&
365
if (typeof(Inline).IsAssignableFrom(elementType) && !
TextSchema
.IsMergeableInline(elementType))
427
if (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
430
while (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
740
if (
TextSchema
.IsParagraphOrBlockUIContainer(pointer.ParentType))
988
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(direction)))
1013
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(direction)))
1023
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(LogicalDirection.Forward))
1205
while (
TextSchema
.IsMergeableInline(thisNavigator.GetElementType(direction)))
1216
TextSchema
.IsMergeableInline(thisNavigator.GetElementType(oppositeDirection)))
1285
while (
TextSchema
.IsMergeableInline(thisNavigator.ParentType))
1305
else if (
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(string)))
1496
else if (
TextSchema
.IsMergeableInline(position.ParentType))
1537
if (!
TextSchema
.IsFormattingType(neighbor))
System\Windows\Documents\TextRange.cs (7)
781
if (!
TextSchema
.IsCharacterProperty(formattingProperty) &&
782
!
TextSchema
.IsParagraphProperty(formattingProperty))
815
!
TextSchema
.IsPropertyIncremental(formattingProperty))
849
if (!
TextSchema
.IsCharacterProperty(formattingProperty) &&
850
!
TextSchema
.IsParagraphProperty(formattingProperty))
1640
else if (
TextSchema
.IsCharacterProperty(formattingProperty))
1644
else if (
TextSchema
.IsParagraphProperty(formattingProperty))
System\Windows\Documents\TextRangeBase.cs (6)
374
if (
TextSchema
.IsCharacterProperty(formattingProperty))
380
Invariant.Assert(
TextSchema
.IsParagraphProperty(formattingProperty), "The property is expected to be one of either character or paragraph formatting one");
404
if (!
TextSchema
.ValuesAreEqual(value, startValue))
485
if (!
TextSchema
.ValuesAreEqual(value, startValue))
1356
TextSchema
.IsValidChild(/*position*/insertPosition, /*childType*/typeof(Block)) &&
1369
Invariant.Assert(
TextSchema
.IsInTextContent(insertPosition), "range.Start is expected to be in text content");
System\Windows\Documents\TextRangeEdit.cs (61)
55
Invariant.Assert(splitPosition.Parent != null &&
TextSchema
.IsMergeableInline(splitPosition.Parent.GetType()));
92
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Inline));
97
if (
TextSchema
.IsStructuralCharacterProperty(property))
107
if (!
TextSchema
.ValuesAreEqual(firstInline.GetValue(property), secondInline.GetValue(property)))
133
DependencyProperty[] noninheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
137
if (!
TextSchema
.ValuesAreEqual(firstElement.GetValue(property), secondElement.GetValue(property)))
171
while (inline != null && inline.IsEmpty && !
TextSchema
.IsFormattingType(inline.GetType()))
195
((inline.NextInline != null &&
TextSchema
.IsFormattingType(inline.NextInline.GetType())) ||
196
(inline.PreviousInline != null &&
TextSchema
.IsFormattingType(inline.PreviousInline.GetType()))))
232
start.Parent == end.Parent &&
TextSchema
.ValuesAreEqual(start.Parent.GetValue(formattingProperty), value))
241
if (
TextSchema
.IsStructuralCharacterProperty(formattingProperty))
263
TextSchema
.IsMergeableInline(position.Parent.GetType()))
268
TextSchema
.IsMergeableInline(position.Parent.GetType()))
282
if (
TextSchema
.IsFormattingType(firstInline.GetType()) && firstInline.TextRange.IsEmpty)
287
else if (
TextSchema
.IsFormattingType(secondInline.GetType()) && secondInline.TextRange.IsEmpty)
292
else if (
TextSchema
.IsKnownType(firstInline.GetType()) &&
TextSchema
.IsKnownType(secondInline.GetType()) &&
294
TextSchema
.IsMergeableInline(firstInline.GetType()) &&
TextSchema
.IsMergeableInline(secondInline.GetType())
327
TextSchema
.IsMergeableInline(inline.Parent.GetType()) &&
328
TextSchema
.IsKnownType(inline.Parent.GetType()) &&
345
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Span));
353
if (!
TextSchema
.ValuesAreEqual(inlineValue, parentSpanValue))
361
if (!
TextSchema
.ValuesAreEqual(inlineValue, outerValue))
370
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
431
else if (parent is Span &&
TextSchema
.IsKnownType(parent.GetType()))
475
if (property.ReadOnly ||
TextSchema
.IsNonFormattingCharacterProperty(property))
491
DependencyProperty[] nonFormattingCharacterProperties =
TextSchema
.GetNonFormattingCharacterProperties();
497
if (!
TextSchema
.ValuesAreEqual(value, outerContextValue))
591
Invariant.Assert(position.TextContainer.Parent == null ||
TextSchema
.IsValidChildOfContainer(position.TextContainer.Parent.GetType(), typeof(Paragraph)));
679
if (!
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(LineBreak)))
685
if (
TextSchema
.IsInTextContent(position))
691
Invariant.Assert(
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(LineBreak)),
789
if (
TextSchema
.IsParagraphOrBlockUIContainer(block.GetType()))
920
TextSchema
.IsStructuralCharacterProperty(property) &&
921
!
TextSchema
.ValuesAreEqual(currentValue, newValue))
955
if (!
TextSchema
.ValuesAreEqual(nextChild.GetValue(property), firstChildValue))
961
if (
TextSchema
.ValuesAreEqual(firstChildValue, currentValue))
1205
if (!
TextSchema
.ValuesAreEqual(newValue, currentValue))
1211
if (!
TextSchema
.ValuesAreEqual(newValue, element.GetValue(property)))
1278
TextSchema
.IsMergeableInline(position.Parent.GetType()))
1283
TextSchema
.IsMergeableInline(position.Parent.GetType()))
1298
TextSchema
.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType()))
1307
TextSchema
.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType()))
1443
if (parent is Inline ||
TextSchema
.AllowsParagraphMerging(parent.GetType()))
1765
while (splitPosition.Parent != null &&
TextSchema
.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor &&
1781
for (int i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1783
DependencyProperty property =
TextSchema
.StructuralCharacterProperties[i];
1813
for (i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1815
DependencyProperty inheritableProperty =
TextSchema
.StructuralCharacterProperties[i];
1816
if (!
TextSchema
.ValuesAreEqual(inline.GetValue(inheritableProperty), inline.Parent.GetValue(inheritableProperty)))
1820
return (i <
TextSchema
.StructuralCharacterProperties.Length);
1828
for (i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1830
DependencyProperty inheritableProperty =
TextSchema
.StructuralCharacterProperties[i];
1835
return (i <
TextSchema
.StructuralCharacterProperties.Length);
2021
if (
TextSchema
.IsMergeableInline(topmostSpan.GetType()) &&
TextSchema
.IsKnownType(topmostSpan.GetType()) && !HasWriteableLocalPropertyValues(topmostSpan))
2036
parent != null &&
TextSchema
.IsMergeableInline(parent.GetType());
2118
TextSchema
.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements
2266
if (!
TextSchema
.IsMergeableInline(parent.GetType()))
2277
if (!
TextSchema
.IsMergeableInline(parent.GetType()))
System\Windows\Documents\TextRangeEditLists.cs (8)
79
Invariant.Assert(
TextSchema
.AllowsParagraphMerging(parentBlock.GetType()));
109
Invariant.Assert(
TextSchema
.AllowsParagraphMerging(previousBlock.GetType()));
637
if (!
TextSchema
.AllowsParagraphMerging(position.Parent.GetType()))
657
if (!
TextSchema
.AllowsParagraphMerging(position.Parent.GetType()))
679
!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/startListItem.List.GetValue(Paragraph.FlowDirectionProperty)))
699
!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/endListItem.List.GetValue(Paragraph.FlowDirectionProperty)))
730
(!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/startListItem.List.GetValue(Paragraph.FlowDirectionProperty))))
738
(!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/endListItem.List.GetValue(Paragraph.FlowDirectionProperty))))
System\Windows\Documents\TextRangeEditTables.cs (6)
633
if (ancestor is List || ancestor is Inline && !
TextSchema
.IsMergeableInline(ancestor.GetType()))
770
Invariant.Assert(
TextSchema
.IsInTextContent(position), "position must be in text content now");
875
if (
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/typeof(Inline)))
881
Invariant.Assert(
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/typeof(Block)), "Expecting valid parent-child relationship");
2299
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Paragraph));
2300
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Paragraph));
System\Windows\Documents\TextRangeSerialization.cs (27)
288
if (
TextSchema
.IsBreak(textReader.ParentType))
538
Type elementTypeStandardized =
TextSchema
.GetStandardElementType(elementType, reduceElement);
556
elementTypeStandardized =
TextSchema
.GetStandardElementType(elementType, /*reduceElement:*/true);
564
bool customTextElement = preserveTextElements && !
TextSchema
.IsKnownType(elementType);
724
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
773
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(elementTypeStandardized);
795
!
TextSchema
.ValuesAreEqual(innerValue, outerValue)) // or the element really affects the property
830
DependencyProperty[] elementProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
921
write = (metadata == null) || !(
TextSchema
.ValuesAreEqual(propertyValue, /*defaultValue*/metadata.DefaultValue) && localValue == DependencyProperty.UnsetValue);
957
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(elementTypeStandardized);
958
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
970
!
TextSchema
.IsKnownType(locallySetProperty.OwnerType))
1114
Type elementTypeStandardized =
TextSchema
.GetStandardElementType(element.GetType(), reduceElement);
1115
DependencyProperty[] elementProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
1167
DependencyProperty[] imageProperties =
TextSchema
.ImageProperties;
1414
TextSchema
.IsFormattingType(positionBeforeParagraph.Parent.GetType()))
1419
TextSchema
.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType()))
1567
if (
TextSchema
.IsCharacterProperty(property) &&
1568
TextSchema
.IsParagraphProperty(property))
1572
if (
TextSchema
.IsBlock(propertyBag.GetType()))
1581
else if (
TextSchema
.IsCharacterProperty(property))
1585
else if (
TextSchema
.IsParagraphProperty(property))
1599
if (
TextSchema
.ValuesAreEqual(start.Parent.GetValue(property), value))
1616
!
TextSchema
.ValuesAreEqual(element.GetValue(property), element.Parent.GetValue(property)))
1635
if (!
TextSchema
.ValuesAreEqual(value, element.GetValue(property)))
1638
if (!
TextSchema
.ValuesAreEqual(value, element.GetValue(property)))
1725
typeof(Inline).IsAssignableFrom(commonAncestor.ParentType) &&
TextSchema
.HasTextDecorations(commonAncestor.GetValue(Inline.TextDecorationsProperty)))
System\Windows\Documents\TextSchema.cs (3)
103
if (
TextSchema
.HasHyperlinkAncestor(parent) &&
104
TextSchema
.HasIllegalHyperlinkDescendant(child, throwIfIllegalHyperlinkDescendent))
127
if (
TextSchema
.HasHyperlinkAncestor(parent))
System\windows\Documents\TextSelection.cs (8)
169
if (this.IsEmpty &&
TextSchema
.IsCharacterProperty(formattingProperty))
460
TextSchema
.IsBreak(caretPosition.GetElementType(LogicalDirection.Backward))))
1256
if (!
TextSchema
.IsParagraphProperty(formattingProperty) && !
TextSchema
.IsCharacterProperty(formattingProperty))
1262
if (this.IsEmpty &&
TextSchema
.IsCharacterProperty(formattingProperty) &&
1461
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Inline));
1462
DependencyProperty[] noninheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
1545
Invariant.Assert(
TextSchema
.IsCharacterProperty(propertyEntry.Property));
System\Windows\Documents\ValidationHelper.cs (1)
105
if (!
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/child.GetType()))