187 references to TextSchema
PresentationFramework (187)
src\Framework\MS\Internal\Annotations\Component\MArkedHighlightComponent.cs (1)
825
!
TextSchema
.IsFormattingType(pointer.ParentType))
src\Framework\System\Windows\Controls\RichTextBox.cs (6)
652
DependencyProperty[] inheritableFormattingProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
660
DependencyProperty[] inheritableBehavioralProperties =
TextSchema
.BehavioralProperties;
679
DependencyProperty[] inheritableFormattingProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
693
DependencyProperty[] inheritableBehavioralProperties =
TextSchema
.BehavioralProperties;
721
if (!
TextSchema
.ValuesAreEqual(inheritedValue, defaultValue))
725
if (!
TextSchema
.ValuesAreEqual(inheritedValue, defaultValue))
src\Framework\System\Windows\Controls\TextBlock.cs (1)
159
if (!
TextSchema
.IsValidChildOfContainer(parentType, /*childType*/valueType))
src\Framework\System\Windows\Documents\FixedTextView.cs (1)
1225
while (
TextSchema
.IsFormattingType( textPointer.GetElementType(dir)) )
src\Framework\System\Windows\Documents\FlowDocument.cs (1)
1652
if (!
TextSchema
.IsValidChildOfContainer(/*parentType:*/_typeofThis, /*childType:*/value.GetType()))
src\Framework\System\Windows\Documents\InlineCollection.cs (2)
164
TextSchema
.ValidateChild((TextElement)this.Parent, child, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
168
if (!
TextSchema
.IsValidChildOfContainer(this.Parent.GetType(), child.GetType()))
src\Framework\System\Windows\Documents\Span.cs (1)
161
Invariant.Assert(
TextSchema
.IsValidChild(/*position*/start, /*childType*/typeof(Span)));
src\Framework\System\Windows\Documents\Speller.cs (2)
1938
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
1943
TextSchema
.IsFormattingType(pointer.ParentType))
src\Framework\System\windows\Documents\TextEditorCharacters.cs (4)
93
if (!
TextSchema
.IsParagraphProperty(formattingProperty) && !
TextSchema
.IsCharacterProperty(formattingProperty))
101
if (
TextSchema
.IsStructuralCharacterProperty(formattingProperty) &&
239
if (!
TextSchema
.HasTextDecorations(textDecorations))
src\Framework\System\windows\Documents\TextEditorSelection.cs (1)
2048
while (
TextSchema
.IsFormattingType(position.ParentType))
src\Framework\System\windows\Documents\TextEditorSpelling.cs (1)
277
if (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
src\Framework\System\windows\Documents\TextEditorTyping.cs (4)
845
if (
TextSchema
.IsBlock(parentType))
847
if (
TextSchema
.IsParagraphOrBlockUIContainer(parentType))
891
TextSchema
.IsParagraphOrBlockUIContainer(navigator.ParentType)))
1931
TextSchema
.HasHyperlinkAncestor((TextElement)pointer.Parent))
src\Framework\System\Windows\Documents\TextElement.cs (4)
852
TextSchema
.ValidateChild(/*parent:*/this, /*child:*/te, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
884
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(InlineUIContainer)))
921
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(string)))
928
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(Run)))
src\Framework\System\Windows\Documents\TextFindEngine.cs (4)
919
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
924
TextSchema
.IsFormattingType(pointer.ParentType))
934
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Backward)))
939
TextSchema
.IsFormattingType(pointer.ParentType))
src\Framework\System\Windows\Documents\TextPointer.cs (7)
1298
if (
TextSchema
.IsInTextContent(this))
1338
if (!
TextSchema
.IsInTextContent(this))
1440
if (!
TextSchema
.IsValidChildOfContainer(containerType, typeof(Paragraph)))
1633
TextSchema
.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType()))
1743
while (ancestor != null &&
TextSchema
.IsMergeableInline(ancestor.GetType()))
3572
bool isValidChild =
TextSchema
.ValidateChild(position, /*childType*/inline.GetType(), false /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
3599
Invariant.Assert(
TextSchema
.IsValidChild(position, /*childType*/inline.GetType()));
src\Framework\System\Windows\Documents\TextPointerBase.cs (20)
184
if (
TextSchema
.IsValidChild(/*position*/backwardPosition, /*childType*/typeof(Run)))
197
backwardContext == TextPointerContext.ElementStart &&
TextSchema
.IsNonFormattingInline(forwardType) &&
201
forwardContext == TextPointerContext.ElementEnd &&
TextSchema
.IsNonFormattingInline(backwardType) &&
206
TextSchema
.IsNonFormattingInline(backwardType) &&
TextSchema
.IsNonFormattingInline(forwardType)
210
typeof(Inline).IsAssignableFrom(backwardType) && !
TextSchema
.IsMergeableInline(backwardType) && !typeof(Run).IsAssignableFrom(forwardType) &&
214
typeof(Inline).IsAssignableFrom(forwardType) && !
TextSchema
.IsMergeableInline(forwardType) && !typeof(Run).IsAssignableFrom(backwardType) &&
370
if (typeof(Inline).IsAssignableFrom(elementType) && !
TextSchema
.IsMergeableInline(elementType))
432
if (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
435
while (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
748
if (
TextSchema
.IsParagraphOrBlockUIContainer(pointer.ParentType))
996
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(direction)))
1021
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(direction)))
1031
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(LogicalDirection.Forward))
1213
while (
TextSchema
.IsMergeableInline(thisNavigator.GetElementType(direction)))
1224
TextSchema
.IsMergeableInline(thisNavigator.GetElementType(oppositeDirection)))
1293
while (
TextSchema
.IsMergeableInline(thisNavigator.ParentType))
1313
else if (
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(string)))
1504
else if (
TextSchema
.IsMergeableInline(position.ParentType))
1545
if (!
TextSchema
.IsFormattingType(neighbor))
src\Framework\System\Windows\Documents\TextRange.cs (7)
784
if (!
TextSchema
.IsCharacterProperty(formattingProperty) &&
785
!
TextSchema
.IsParagraphProperty(formattingProperty))
819
!
TextSchema
.IsPropertyIncremental(formattingProperty))
856
if (!
TextSchema
.IsCharacterProperty(formattingProperty) &&
857
!
TextSchema
.IsParagraphProperty(formattingProperty))
1648
else if (
TextSchema
.IsCharacterProperty(formattingProperty))
1652
else if (
TextSchema
.IsParagraphProperty(formattingProperty))
src\Framework\System\Windows\Documents\TextRangeBase.cs (6)
389
if (
TextSchema
.IsCharacterProperty(formattingProperty))
395
Invariant.Assert(
TextSchema
.IsParagraphProperty(formattingProperty), "The property is expected to be one of either character or paragraph formatting one");
419
if (!
TextSchema
.ValuesAreEqual(value, startValue))
500
if (!
TextSchema
.ValuesAreEqual(value, startValue))
1374
TextSchema
.IsValidChild(/*position*/insertPosition, /*childType*/typeof(Block)) &&
1387
Invariant.Assert(
TextSchema
.IsInTextContent(insertPosition), "range.Start is expected to be in text content");
src\Framework\System\Windows\Documents\TextRangeEdit.cs (61)
60
Invariant.Assert(splitPosition.Parent != null &&
TextSchema
.IsMergeableInline(splitPosition.Parent.GetType()));
97
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Inline));
102
if (
TextSchema
.IsStructuralCharacterProperty(property))
112
if (!
TextSchema
.ValuesAreEqual(firstInline.GetValue(property), secondInline.GetValue(property)))
138
DependencyProperty[] noninheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
142
if (!
TextSchema
.ValuesAreEqual(firstElement.GetValue(property), secondElement.GetValue(property)))
176
while (inline != null && inline.IsEmpty && !
TextSchema
.IsFormattingType(inline.GetType()))
200
((inline.NextInline != null &&
TextSchema
.IsFormattingType(inline.NextInline.GetType())) ||
201
(inline.PreviousInline != null &&
TextSchema
.IsFormattingType(inline.PreviousInline.GetType()))))
237
start.Parent == end.Parent &&
TextSchema
.ValuesAreEqual(start.Parent.GetValue(formattingProperty), value))
246
if (
TextSchema
.IsStructuralCharacterProperty(formattingProperty))
268
TextSchema
.IsMergeableInline(position.Parent.GetType()))
273
TextSchema
.IsMergeableInline(position.Parent.GetType()))
287
if (
TextSchema
.IsFormattingType(firstInline.GetType()) && firstInline.TextRange.IsEmpty)
292
else if (
TextSchema
.IsFormattingType(secondInline.GetType()) && secondInline.TextRange.IsEmpty)
297
else if (
TextSchema
.IsKnownType(firstInline.GetType()) &&
TextSchema
.IsKnownType(secondInline.GetType()) &&
299
TextSchema
.IsMergeableInline(firstInline.GetType()) &&
TextSchema
.IsMergeableInline(secondInline.GetType())
332
TextSchema
.IsMergeableInline(inline.Parent.GetType()) &&
333
TextSchema
.IsKnownType(inline.Parent.GetType()) &&
350
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Span));
358
if (!
TextSchema
.ValuesAreEqual(inlineValue, parentSpanValue))
366
if (!
TextSchema
.ValuesAreEqual(inlineValue, outerValue))
375
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
436
else if (parent is Span &&
TextSchema
.IsKnownType(parent.GetType()))
480
if (property.ReadOnly ||
TextSchema
.IsNonFormattingCharacterProperty(property))
496
DependencyProperty[] nonFormattingCharacterProperties =
TextSchema
.GetNonFormattingCharacterProperties();
502
if (!
TextSchema
.ValuesAreEqual(value, outerContextValue))
596
Invariant.Assert(position.TextContainer.Parent == null ||
TextSchema
.IsValidChildOfContainer(position.TextContainer.Parent.GetType(), typeof(Paragraph)));
684
if (!
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(LineBreak)))
690
if (
TextSchema
.IsInTextContent(position))
696
Invariant.Assert(
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(LineBreak)),
794
if (
TextSchema
.IsParagraphOrBlockUIContainer(block.GetType()))
925
TextSchema
.IsStructuralCharacterProperty(property) &&
926
!
TextSchema
.ValuesAreEqual(currentValue, newValue))
960
if (!
TextSchema
.ValuesAreEqual(nextChild.GetValue(property), firstChildValue))
966
if (
TextSchema
.ValuesAreEqual(firstChildValue, currentValue))
1210
if (!
TextSchema
.ValuesAreEqual(newValue, currentValue))
1216
if (!
TextSchema
.ValuesAreEqual(newValue, element.GetValue(property)))
1283
TextSchema
.IsMergeableInline(position.Parent.GetType()))
1288
TextSchema
.IsMergeableInline(position.Parent.GetType()))
1303
TextSchema
.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType()))
1312
TextSchema
.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType()))
1448
if (parent is Inline ||
TextSchema
.AllowsParagraphMerging(parent.GetType()))
1770
while (splitPosition.Parent != null &&
TextSchema
.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor &&
1786
for (int i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1788
DependencyProperty property =
TextSchema
.StructuralCharacterProperties[i];
1818
for (i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1820
DependencyProperty inheritableProperty =
TextSchema
.StructuralCharacterProperties[i];
1821
if (!
TextSchema
.ValuesAreEqual(inline.GetValue(inheritableProperty), inline.Parent.GetValue(inheritableProperty)))
1825
return (i <
TextSchema
.StructuralCharacterProperties.Length);
1833
for (i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1835
DependencyProperty inheritableProperty =
TextSchema
.StructuralCharacterProperties[i];
1840
return (i <
TextSchema
.StructuralCharacterProperties.Length);
2026
if (
TextSchema
.IsMergeableInline(topmostSpan.GetType()) &&
TextSchema
.IsKnownType(topmostSpan.GetType()) && !HasWriteableLocalPropertyValues(topmostSpan))
2041
parent != null &&
TextSchema
.IsMergeableInline(parent.GetType());
2123
TextSchema
.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements
2271
if (!
TextSchema
.IsMergeableInline(parent.GetType()))
2282
if (!
TextSchema
.IsMergeableInline(parent.GetType()))
src\Framework\System\Windows\Documents\TextRangeEditLists.cs (8)
84
Invariant.Assert(
TextSchema
.AllowsParagraphMerging(parentBlock.GetType()));
114
Invariant.Assert(
TextSchema
.AllowsParagraphMerging(previousBlock.GetType()));
640
if (!
TextSchema
.AllowsParagraphMerging(position.Parent.GetType()))
660
if (!
TextSchema
.AllowsParagraphMerging(position.Parent.GetType()))
682
!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/startListItem.List.GetValue(Paragraph.FlowDirectionProperty)))
702
!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/endListItem.List.GetValue(Paragraph.FlowDirectionProperty)))
733
(!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/startListItem.List.GetValue(Paragraph.FlowDirectionProperty))))
741
(!
TextSchema
.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/endListItem.List.GetValue(Paragraph.FlowDirectionProperty))))
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (6)
639
if (ancestor is List || ancestor is Inline && !
TextSchema
.IsMergeableInline(ancestor.GetType()))
772
Invariant.Assert(
TextSchema
.IsInTextContent(position), "position must be in text content now");
877
if (
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/typeof(Inline)))
883
Invariant.Assert(
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/typeof(Block)), "Expecting valid parent-child relationship");
2301
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Paragraph));
2302
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Paragraph));
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (27)
301
if (
TextSchema
.IsBreak(textReader.ParentType))
551
Type elementTypeStandardized =
TextSchema
.GetStandardElementType(elementType, reduceElement);
569
elementTypeStandardized =
TextSchema
.GetStandardElementType(elementType, /*reduceElement:*/true);
577
bool customTextElement = preserveTextElements && !
TextSchema
.IsKnownType(elementType);
737
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
786
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(elementTypeStandardized);
808
!
TextSchema
.ValuesAreEqual(innerValue, outerValue)) // or the element really affects the property
843
DependencyProperty[] elementProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
935
write = (metadata == null) || !(
TextSchema
.ValuesAreEqual(propertyValue, /*defaultValue*/metadata.DefaultValue) && localValue == DependencyProperty.UnsetValue);
971
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(elementTypeStandardized);
972
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
984
!
TextSchema
.IsKnownType(locallySetProperty.OwnerType))
1145
Type elementTypeStandardized =
TextSchema
.GetStandardElementType(element.GetType(), reduceElement);
1146
DependencyProperty[] elementProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
1198
DependencyProperty[] imageProperties =
TextSchema
.ImageProperties;
1445
TextSchema
.IsFormattingType(positionBeforeParagraph.Parent.GetType()))
1450
TextSchema
.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType()))
1594
if (
TextSchema
.IsCharacterProperty(property) &&
1595
TextSchema
.IsParagraphProperty(property))
1599
if (
TextSchema
.IsBlock(propertyBag.GetType()))
1608
else if (
TextSchema
.IsCharacterProperty(property))
1612
else if (
TextSchema
.IsParagraphProperty(property))
1626
if (
TextSchema
.ValuesAreEqual(start.Parent.GetValue(property), value))
1643
!
TextSchema
.ValuesAreEqual(element.GetValue(property), element.Parent.GetValue(property)))
1662
if (!
TextSchema
.ValuesAreEqual(value, element.GetValue(property)))
1665
if (!
TextSchema
.ValuesAreEqual(value, element.GetValue(property)))
1752
typeof(Inline).IsAssignableFrom(commonAncestor.ParentType) &&
TextSchema
.HasTextDecorations(commonAncestor.GetValue(Inline.TextDecorationsProperty)))
src\Framework\System\Windows\Documents\TextSchema.cs (3)
107
if (
TextSchema
.HasHyperlinkAncestor(parent) &&
108
TextSchema
.HasIllegalHyperlinkDescendant(child, throwIfIllegalHyperlinkDescendent))
131
if (
TextSchema
.HasHyperlinkAncestor(parent))
src\Framework\System\windows\Documents\TextSelection.cs (8)
176
if (this.IsEmpty &&
TextSchema
.IsCharacterProperty(formattingProperty))
479
TextSchema
.IsBreak(caretPosition.GetElementType(LogicalDirection.Backward))))
1278
if (!
TextSchema
.IsParagraphProperty(formattingProperty) && !
TextSchema
.IsCharacterProperty(formattingProperty))
1284
if (this.IsEmpty &&
TextSchema
.IsCharacterProperty(formattingProperty) &&
1483
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Inline));
1484
DependencyProperty[] noninheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
1567
Invariant.Assert(
TextSchema
.IsCharacterProperty(propertyEntry.Property));
src\Framework\System\Windows\Documents\ValidationHelper.cs (1)
116
if (!
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/child.GetType()))