187 references to TextSchema
PresentationFramework (187)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (1)
803
!
TextSchema
.IsFormattingType(pointer.ParentType))
System\Windows\Controls\RichTextBox.cs (6)
638
DependencyProperty[] inheritableFormattingProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
646
DependencyProperty[] inheritableBehavioralProperties =
TextSchema
.BehavioralProperties;
665
DependencyProperty[] inheritableFormattingProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
679
DependencyProperty[] inheritableBehavioralProperties =
TextSchema
.BehavioralProperties;
707
if (!
TextSchema
.ValuesAreEqual(inheritedValue, defaultValue))
711
if (!
TextSchema
.ValuesAreEqual(inheritedValue, defaultValue))
System\Windows\Controls\TextBlock.cs (1)
150
if (!
TextSchema
.IsValidChildOfContainer(parentType, /*childType*/valueType))
System\Windows\Documents\FixedTextView.cs (1)
1213
while (
TextSchema
.IsFormattingType( textPointer.GetElementType(dir)) )
System\Windows\Documents\FlowDocument.cs (1)
1640
if (!
TextSchema
.IsValidChildOfContainer(/*parentType:*/_typeofThis, /*childType:*/value.GetType()))
System\Windows\Documents\InlineCollection.cs (2)
163
TextSchema
.ValidateChild((TextElement)this.Parent, child, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
167
if (!
TextSchema
.IsValidChildOfContainer(this.Parent.GetType(), child.GetType()))
System\Windows\Documents\Span.cs (1)
155
Invariant.Assert(
TextSchema
.IsValidChild(/*position*/start, /*childType*/typeof(Span)));
System\Windows\Documents\Speller.cs (2)
1810
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
1815
TextSchema
.IsFormattingType(pointer.ParentType))
System\windows\Documents\TextEditorCharacters.cs (4)
91
if (!
TextSchema
.IsParagraphProperty(formattingProperty) && !
TextSchema
.IsCharacterProperty(formattingProperty))
99
if (
TextSchema
.IsStructuralCharacterProperty(formattingProperty) &&
237
if (!
TextSchema
.HasTextDecorations(textDecorations))
System\windows\Documents\TextEditorSelection.cs (1)
2039
while (
TextSchema
.IsFormattingType(position.ParentType))
System\windows\Documents\TextEditorSpelling.cs (1)
275
if (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
System\windows\Documents\TextEditorTyping.cs (4)
828
if (
TextSchema
.IsBlock(parentType))
830
if (
TextSchema
.IsParagraphOrBlockUIContainer(parentType))
874
TextSchema
.IsParagraphOrBlockUIContainer(navigator.ParentType)))
1901
TextSchema
.HasHyperlinkAncestor((TextElement)pointer.Parent))
System\Windows\Documents\TextElement.cs (4)
811
TextSchema
.ValidateChild(/*parent:*/this, /*child:*/te, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
843
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(InlineUIContainer)))
877
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(string)))
884
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(Run)))
System\Windows\Documents\TextFindEngine.cs (4)
908
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
913
TextSchema
.IsFormattingType(pointer.ParentType))
923
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Backward)))
928
TextSchema
.IsFormattingType(pointer.ParentType))
System\Windows\Documents\TextPointer.cs (7)
1284
if (
TextSchema
.IsInTextContent(this))
1324
if (!
TextSchema
.IsInTextContent(this))
1426
if (!
TextSchema
.IsValidChildOfContainer(containerType, typeof(Paragraph)))
1619
TextSchema
.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType()))
1729
while (ancestor != null &&
TextSchema
.IsMergeableInline(ancestor.GetType()))
3546
bool isValidChild =
TextSchema
.ValidateChild(position, /*childType*/inline.GetType(), false /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
3573
Invariant.Assert(
TextSchema
.IsValidChild(position, /*childType*/inline.GetType()));
System\Windows\Documents\TextPointerBase.cs (20)
182
if (
TextSchema
.IsValidChild(/*position*/backwardPosition, /*childType*/typeof(Run)))
195
backwardContext == TextPointerContext.ElementStart &&
TextSchema
.IsNonFormattingInline(forwardType) &&
199
forwardContext == TextPointerContext.ElementEnd &&
TextSchema
.IsNonFormattingInline(backwardType) &&
204
TextSchema
.IsNonFormattingInline(backwardType) &&
TextSchema
.IsNonFormattingInline(forwardType)
208
typeof(Inline).IsAssignableFrom(backwardType) && !
TextSchema
.IsMergeableInline(backwardType) && !typeof(Run).IsAssignableFrom(forwardType) &&
212
typeof(Inline).IsAssignableFrom(forwardType) && !
TextSchema
.IsMergeableInline(forwardType) && !typeof(Run).IsAssignableFrom(backwardType) &&
368
if (typeof(Inline).IsAssignableFrom(elementType) && !
TextSchema
.IsMergeableInline(elementType))
430
if (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
433
while (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
743
if (
TextSchema
.IsParagraphOrBlockUIContainer(pointer.ParentType))
991
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(direction)))
1016
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(direction)))
1026
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(LogicalDirection.Forward))
1208
while (
TextSchema
.IsMergeableInline(thisNavigator.GetElementType(direction)))
1219
TextSchema
.IsMergeableInline(thisNavigator.GetElementType(oppositeDirection)))
1288
while (
TextSchema
.IsMergeableInline(thisNavigator.ParentType))
1308
else if (
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(string)))
1499
else if (
TextSchema
.IsMergeableInline(position.ParentType))
1540
if (!
TextSchema
.IsFormattingType(neighbor))
System\Windows\Documents\TextRange.cs (7)
791
if (!
TextSchema
.IsCharacterProperty(formattingProperty) &&
792
!
TextSchema
.IsParagraphProperty(formattingProperty))
826
!
TextSchema
.IsPropertyIncremental(formattingProperty))
860
if (!
TextSchema
.IsCharacterProperty(formattingProperty) &&
861
!
TextSchema
.IsParagraphProperty(formattingProperty))
1651
else if (
TextSchema
.IsCharacterProperty(formattingProperty))
1655
else if (
TextSchema
.IsParagraphProperty(formattingProperty))
System\Windows\Documents\TextRangeBase.cs (6)
378
if (
TextSchema
.IsCharacterProperty(formattingProperty))
384
Invariant.Assert(
TextSchema
.IsParagraphProperty(formattingProperty), "The property is expected to be one of either character or paragraph formatting one");
408
if (!
TextSchema
.ValuesAreEqual(value, startValue))
489
if (!
TextSchema
.ValuesAreEqual(value, startValue))
1360
TextSchema
.IsValidChild(/*position*/insertPosition, /*childType*/typeof(Block)) &&
1373
Invariant.Assert(
TextSchema
.IsInTextContent(insertPosition), "range.Start is expected to be in text content");
System\Windows\Documents\TextRangeEdit.cs (61)
58
Invariant.Assert(splitPosition.Parent != null &&
TextSchema
.IsMergeableInline(splitPosition.Parent.GetType()));
95
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Inline));
100
if (
TextSchema
.IsStructuralCharacterProperty(property))
110
if (!
TextSchema
.ValuesAreEqual(firstInline.GetValue(property), secondInline.GetValue(property)))
136
DependencyProperty[] noninheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
140
if (!
TextSchema
.ValuesAreEqual(firstElement.GetValue(property), secondElement.GetValue(property)))
174
while (inline != null && inline.IsEmpty && !
TextSchema
.IsFormattingType(inline.GetType()))
198
((inline.NextInline != null &&
TextSchema
.IsFormattingType(inline.NextInline.GetType())) ||
199
(inline.PreviousInline != null &&
TextSchema
.IsFormattingType(inline.PreviousInline.GetType()))))
235
start.Parent == end.Parent &&
TextSchema
.ValuesAreEqual(start.Parent.GetValue(formattingProperty), value))
244
if (
TextSchema
.IsStructuralCharacterProperty(formattingProperty))
266
TextSchema
.IsMergeableInline(position.Parent.GetType()))
271
TextSchema
.IsMergeableInline(position.Parent.GetType()))
285
if (
TextSchema
.IsFormattingType(firstInline.GetType()) && firstInline.TextRange.IsEmpty)
290
else if (
TextSchema
.IsFormattingType(secondInline.GetType()) && secondInline.TextRange.IsEmpty)
295
else if (
TextSchema
.IsKnownType(firstInline.GetType()) &&
TextSchema
.IsKnownType(secondInline.GetType()) &&
297
TextSchema
.IsMergeableInline(firstInline.GetType()) &&
TextSchema
.IsMergeableInline(secondInline.GetType())
330
TextSchema
.IsMergeableInline(inline.Parent.GetType()) &&
331
TextSchema
.IsKnownType(inline.Parent.GetType()) &&
348
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Span));
356
if (!
TextSchema
.ValuesAreEqual(inlineValue, parentSpanValue))
364
if (!
TextSchema
.ValuesAreEqual(inlineValue, outerValue))
373
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
434
else if (parent is Span &&
TextSchema
.IsKnownType(parent.GetType()))
478
if (property.ReadOnly ||
TextSchema
.IsNonFormattingCharacterProperty(property))
494
DependencyProperty[] nonFormattingCharacterProperties =
TextSchema
.GetNonFormattingCharacterProperties();
500
if (!
TextSchema
.ValuesAreEqual(value, outerContextValue))
594
Invariant.Assert(position.TextContainer.Parent == null ||
TextSchema
.IsValidChildOfContainer(position.TextContainer.Parent.GetType(), typeof(Paragraph)));
682
if (!
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(LineBreak)))
688
if (
TextSchema
.IsInTextContent(position))
694
Invariant.Assert(
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(LineBreak)),
792
if (
TextSchema
.IsParagraphOrBlockUIContainer(block.GetType()))
923
TextSchema
.IsStructuralCharacterProperty(property) &&
924
!
TextSchema
.ValuesAreEqual(currentValue, newValue))
958
if (!
TextSchema
.ValuesAreEqual(nextChild.GetValue(property), firstChildValue))
964
if (
TextSchema
.ValuesAreEqual(firstChildValue, currentValue))
1208
if (!
TextSchema
.ValuesAreEqual(newValue, currentValue))
1214
if (!
TextSchema
.ValuesAreEqual(newValue, element.GetValue(property)))
1281
TextSchema
.IsMergeableInline(position.Parent.GetType()))
1286
TextSchema
.IsMergeableInline(position.Parent.GetType()))
1301
TextSchema
.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType()))
1310
TextSchema
.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType()))
1446
if (parent is Inline ||
TextSchema
.AllowsParagraphMerging(parent.GetType()))
1768
while (splitPosition.Parent != null &&
TextSchema
.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor &&
1784
for (int i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1786
DependencyProperty property =
TextSchema
.StructuralCharacterProperties[i];
1816
for (i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1818
DependencyProperty inheritableProperty =
TextSchema
.StructuralCharacterProperties[i];
1819
if (!
TextSchema
.ValuesAreEqual(inline.GetValue(inheritableProperty), inline.Parent.GetValue(inheritableProperty)))
1823
return (i <
TextSchema
.StructuralCharacterProperties.Length);
1831
for (i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1833
DependencyProperty inheritableProperty =
TextSchema
.StructuralCharacterProperties[i];
1838
return (i <
TextSchema
.StructuralCharacterProperties.Length);
2024
if (
TextSchema
.IsMergeableInline(topmostSpan.GetType()) &&
TextSchema
.IsKnownType(topmostSpan.GetType()) && !HasWriteableLocalPropertyValues(topmostSpan))
2039
parent != null &&
TextSchema
.IsMergeableInline(parent.GetType());
2121
TextSchema
.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements
2269
if (!
TextSchema
.IsMergeableInline(parent.GetType()))
2280
if (!
TextSchema
.IsMergeableInline(parent.GetType()))
System\Windows\Documents\TextRangeEditLists.cs (8)
82
Invariant.Assert(
TextSchema
.AllowsParagraphMerging(parentBlock.GetType()));
112
Invariant.Assert(
TextSchema
.AllowsParagraphMerging(previousBlock.GetType()));
638
if (!
TextSchema
.AllowsParagraphMerging(position.Parent.GetType()))
658
if (!
TextSchema
.AllowsParagraphMerging(position.Parent.GetType()))
680
!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/startListItem.List.GetValue(Paragraph.FlowDirectionProperty)))
700
!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/endListItem.List.GetValue(Paragraph.FlowDirectionProperty)))
731
(!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/startListItem.List.GetValue(Paragraph.FlowDirectionProperty))))
739
(!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/endListItem.List.GetValue(Paragraph.FlowDirectionProperty))))
System\Windows\Documents\TextRangeEditTables.cs (6)
636
if (ancestor is List || ancestor is Inline && !
TextSchema
.IsMergeableInline(ancestor.GetType()))
769
Invariant.Assert(
TextSchema
.IsInTextContent(position), "position must be in text content now");
874
if (
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/typeof(Inline)))
880
Invariant.Assert(
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/typeof(Block)), "Expecting valid parent-child relationship");
2298
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Paragraph));
2299
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Paragraph));
System\Windows\Documents\TextRangeSerialization.cs (27)
295
if (
TextSchema
.IsBreak(textReader.ParentType))
545
Type elementTypeStandardized =
TextSchema
.GetStandardElementType(elementType, reduceElement);
563
elementTypeStandardized =
TextSchema
.GetStandardElementType(elementType, /*reduceElement:*/true);
571
bool customTextElement = preserveTextElements && !
TextSchema
.IsKnownType(elementType);
731
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
780
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(elementTypeStandardized);
802
!
TextSchema
.ValuesAreEqual(innerValue, outerValue)) // or the element really affects the property
837
DependencyProperty[] elementProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
928
write = (metadata == null) || !(
TextSchema
.ValuesAreEqual(propertyValue, /*defaultValue*/metadata.DefaultValue) && localValue == DependencyProperty.UnsetValue);
964
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(elementTypeStandardized);
965
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
977
!
TextSchema
.IsKnownType(locallySetProperty.OwnerType))
1121
Type elementTypeStandardized =
TextSchema
.GetStandardElementType(element.GetType(), reduceElement);
1122
DependencyProperty[] elementProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
1174
DependencyProperty[] imageProperties =
TextSchema
.ImageProperties;
1421
TextSchema
.IsFormattingType(positionBeforeParagraph.Parent.GetType()))
1426
TextSchema
.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType()))
1574
if (
TextSchema
.IsCharacterProperty(property) &&
1575
TextSchema
.IsParagraphProperty(property))
1579
if (
TextSchema
.IsBlock(propertyBag.GetType()))
1588
else if (
TextSchema
.IsCharacterProperty(property))
1592
else if (
TextSchema
.IsParagraphProperty(property))
1606
if (
TextSchema
.ValuesAreEqual(start.Parent.GetValue(property), value))
1623
!
TextSchema
.ValuesAreEqual(element.GetValue(property), element.Parent.GetValue(property)))
1642
if (!
TextSchema
.ValuesAreEqual(value, element.GetValue(property)))
1645
if (!
TextSchema
.ValuesAreEqual(value, element.GetValue(property)))
1732
typeof(Inline).IsAssignableFrom(commonAncestor.ParentType) &&
TextSchema
.HasTextDecorations(commonAncestor.GetValue(Inline.TextDecorationsProperty)))
System\Windows\Documents\TextSchema.cs (3)
105
if (
TextSchema
.HasHyperlinkAncestor(parent) &&
106
TextSchema
.HasIllegalHyperlinkDescendant(child, throwIfIllegalHyperlinkDescendent))
129
if (
TextSchema
.HasHyperlinkAncestor(parent))
System\windows\Documents\TextSelection.cs (8)
173
if (this.IsEmpty &&
TextSchema
.IsCharacterProperty(formattingProperty))
476
TextSchema
.IsBreak(caretPosition.GetElementType(LogicalDirection.Backward))))
1275
if (!
TextSchema
.IsParagraphProperty(formattingProperty) && !
TextSchema
.IsCharacterProperty(formattingProperty))
1281
if (this.IsEmpty &&
TextSchema
.IsCharacterProperty(formattingProperty) &&
1480
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Inline));
1481
DependencyProperty[] noninheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
1564
Invariant.Assert(
TextSchema
.IsCharacterProperty(propertyEntry.Property));
System\Windows\Documents\ValidationHelper.cs (1)
108
if (!
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/child.GetType()))