187 references to TextSchema
PresentationFramework (187)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (1)
803
!
TextSchema
.IsFormattingType(pointer.ParentType))
System\Windows\Controls\RichTextBox.cs (6)
636
DependencyProperty[] inheritableFormattingProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
644
DependencyProperty[] inheritableBehavioralProperties =
TextSchema
.BehavioralProperties;
663
DependencyProperty[] inheritableFormattingProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
677
DependencyProperty[] inheritableBehavioralProperties =
TextSchema
.BehavioralProperties;
705
if (!
TextSchema
.ValuesAreEqual(inheritedValue, defaultValue))
709
if (!
TextSchema
.ValuesAreEqual(inheritedValue, defaultValue))
System\Windows\Controls\TextBlock.cs (1)
138
if (!
TextSchema
.IsValidChildOfContainer(parentType, /*childType*/valueType))
System\Windows\Documents\FixedTextView.cs (1)
1200
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)
162
TextSchema
.ValidateChild((TextElement)this.Parent, child, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
166
if (!
TextSchema
.IsValidChildOfContainer(this.Parent.GetType(), child.GetType()))
System\Windows\Documents\Span.cs (1)
154
Invariant.Assert(
TextSchema
.IsValidChild(/*position*/start, /*childType*/typeof(Span)));
System\Windows\Documents\Speller.cs (2)
1806
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
1811
TextSchema
.IsFormattingType(pointer.ParentType))
System\windows\Documents\TextEditorCharacters.cs (4)
75
if (!
TextSchema
.IsParagraphProperty(formattingProperty) && !
TextSchema
.IsCharacterProperty(formattingProperty))
83
if (
TextSchema
.IsStructuralCharacterProperty(formattingProperty) &&
221
if (!
TextSchema
.HasTextDecorations(textDecorations))
System\windows\Documents\TextEditorSelection.cs (1)
2024
while (
TextSchema
.IsFormattingType(position.ParentType))
System\windows\Documents\TextEditorSpelling.cs (1)
274
if (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
System\windows\Documents\TextEditorTyping.cs (4)
819
if (
TextSchema
.IsBlock(parentType))
821
if (
TextSchema
.IsParagraphOrBlockUIContainer(parentType))
865
TextSchema
.IsParagraphOrBlockUIContainer(navigator.ParentType)))
1892
TextSchema
.HasHyperlinkAncestor((TextElement)pointer.Parent))
System\Windows\Documents\TextElement.cs (4)
796
TextSchema
.ValidateChild(/*parent:*/this, /*child:*/te, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
828
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(InlineUIContainer)))
862
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(string)))
869
if (
TextSchema
.IsValidChild(/*parent:*/this, /*childType:*/typeof(Run)))
System\Windows\Documents\TextFindEngine.cs (4)
900
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
905
TextSchema
.IsFormattingType(pointer.ParentType))
915
TextSchema
.IsFormattingType(pointer.GetElementType(LogicalDirection.Backward)))
920
TextSchema
.IsFormattingType(pointer.ParentType))
System\Windows\Documents\TextPointer.cs (7)
1279
if (
TextSchema
.IsInTextContent(this))
1319
if (!
TextSchema
.IsInTextContent(this))
1421
if (!
TextSchema
.IsValidChildOfContainer(containerType, typeof(Paragraph)))
1614
TextSchema
.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType()))
1724
while (ancestor != null &&
TextSchema
.IsMergeableInline(ancestor.GetType()))
3541
bool isValidChild =
TextSchema
.ValidateChild(position, /*childType*/inline.GetType(), false /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
3568
Invariant.Assert(
TextSchema
.IsValidChild(position, /*childType*/inline.GetType()));
System\Windows\Documents\TextPointerBase.cs (20)
180
if (
TextSchema
.IsValidChild(/*position*/backwardPosition, /*childType*/typeof(Run)))
193
backwardContext == TextPointerContext.ElementStart &&
TextSchema
.IsNonFormattingInline(forwardType) &&
197
forwardContext == TextPointerContext.ElementEnd &&
TextSchema
.IsNonFormattingInline(backwardType) &&
202
TextSchema
.IsNonFormattingInline(backwardType) &&
TextSchema
.IsNonFormattingInline(forwardType)
206
typeof(Inline).IsAssignableFrom(backwardType) && !
TextSchema
.IsMergeableInline(backwardType) && !typeof(Run).IsAssignableFrom(forwardType) &&
210
typeof(Inline).IsAssignableFrom(forwardType) && !
TextSchema
.IsMergeableInline(forwardType) && !typeof(Run).IsAssignableFrom(backwardType) &&
366
if (typeof(Inline).IsAssignableFrom(elementType) && !
TextSchema
.IsMergeableInline(elementType))
428
if (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
431
while (
TextSchema
.IsFormattingType(position.GetElementType(direction)))
741
if (
TextSchema
.IsParagraphOrBlockUIContainer(pointer.ParentType))
989
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(direction)))
1014
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(direction)))
1024
while (
TextSchema
.IsFormattingType(thisNavigator.GetElementType(LogicalDirection.Forward))
1206
while (
TextSchema
.IsMergeableInline(thisNavigator.GetElementType(direction)))
1217
TextSchema
.IsMergeableInline(thisNavigator.GetElementType(oppositeDirection)))
1286
while (
TextSchema
.IsMergeableInline(thisNavigator.ParentType))
1306
else if (
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(string)))
1497
else if (
TextSchema
.IsMergeableInline(position.ParentType))
1538
if (!
TextSchema
.IsFormattingType(neighbor))
System\Windows\Documents\TextRange.cs (7)
782
if (!
TextSchema
.IsCharacterProperty(formattingProperty) &&
783
!
TextSchema
.IsParagraphProperty(formattingProperty))
816
!
TextSchema
.IsPropertyIncremental(formattingProperty))
850
if (!
TextSchema
.IsCharacterProperty(formattingProperty) &&
851
!
TextSchema
.IsParagraphProperty(formattingProperty))
1641
else if (
TextSchema
.IsCharacterProperty(formattingProperty))
1645
else if (
TextSchema
.IsParagraphProperty(formattingProperty))
System\Windows\Documents\TextRangeBase.cs (6)
375
if (
TextSchema
.IsCharacterProperty(formattingProperty))
381
Invariant.Assert(
TextSchema
.IsParagraphProperty(formattingProperty), "The property is expected to be one of either character or paragraph formatting one");
405
if (!
TextSchema
.ValuesAreEqual(value, startValue))
486
if (!
TextSchema
.ValuesAreEqual(value, startValue))
1357
TextSchema
.IsValidChild(/*position*/insertPosition, /*childType*/typeof(Block)) &&
1370
Invariant.Assert(
TextSchema
.IsInTextContent(insertPosition), "range.Start is expected to be in text content");
System\Windows\Documents\TextRangeEdit.cs (61)
56
Invariant.Assert(splitPosition.Parent != null &&
TextSchema
.IsMergeableInline(splitPosition.Parent.GetType()));
93
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Inline));
98
if (
TextSchema
.IsStructuralCharacterProperty(property))
108
if (!
TextSchema
.ValuesAreEqual(firstInline.GetValue(property), secondInline.GetValue(property)))
134
DependencyProperty[] noninheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
138
if (!
TextSchema
.ValuesAreEqual(firstElement.GetValue(property), secondElement.GetValue(property)))
172
while (inline != null && inline.IsEmpty && !
TextSchema
.IsFormattingType(inline.GetType()))
196
((inline.NextInline != null &&
TextSchema
.IsFormattingType(inline.NextInline.GetType())) ||
197
(inline.PreviousInline != null &&
TextSchema
.IsFormattingType(inline.PreviousInline.GetType()))))
233
start.Parent == end.Parent &&
TextSchema
.ValuesAreEqual(start.Parent.GetValue(formattingProperty), value))
242
if (
TextSchema
.IsStructuralCharacterProperty(formattingProperty))
264
TextSchema
.IsMergeableInline(position.Parent.GetType()))
269
TextSchema
.IsMergeableInline(position.Parent.GetType()))
283
if (
TextSchema
.IsFormattingType(firstInline.GetType()) && firstInline.TextRange.IsEmpty)
288
else if (
TextSchema
.IsFormattingType(secondInline.GetType()) && secondInline.TextRange.IsEmpty)
293
else if (
TextSchema
.IsKnownType(firstInline.GetType()) &&
TextSchema
.IsKnownType(secondInline.GetType()) &&
295
TextSchema
.IsMergeableInline(firstInline.GetType()) &&
TextSchema
.IsMergeableInline(secondInline.GetType())
328
TextSchema
.IsMergeableInline(inline.Parent.GetType()) &&
329
TextSchema
.IsKnownType(inline.Parent.GetType()) &&
346
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Span));
354
if (!
TextSchema
.ValuesAreEqual(inlineValue, parentSpanValue))
362
if (!
TextSchema
.ValuesAreEqual(inlineValue, outerValue))
371
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
432
else if (parent is Span &&
TextSchema
.IsKnownType(parent.GetType()))
476
if (property.ReadOnly ||
TextSchema
.IsNonFormattingCharacterProperty(property))
492
DependencyProperty[] nonFormattingCharacterProperties =
TextSchema
.GetNonFormattingCharacterProperties();
498
if (!
TextSchema
.ValuesAreEqual(value, outerContextValue))
592
Invariant.Assert(position.TextContainer.Parent == null ||
TextSchema
.IsValidChildOfContainer(position.TextContainer.Parent.GetType(), typeof(Paragraph)));
680
if (!
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(LineBreak)))
686
if (
TextSchema
.IsInTextContent(position))
692
Invariant.Assert(
TextSchema
.IsValidChild(/*position*/position, /*childType*/typeof(LineBreak)),
790
if (
TextSchema
.IsParagraphOrBlockUIContainer(block.GetType()))
921
TextSchema
.IsStructuralCharacterProperty(property) &&
922
!
TextSchema
.ValuesAreEqual(currentValue, newValue))
956
if (!
TextSchema
.ValuesAreEqual(nextChild.GetValue(property), firstChildValue))
962
if (
TextSchema
.ValuesAreEqual(firstChildValue, currentValue))
1206
if (!
TextSchema
.ValuesAreEqual(newValue, currentValue))
1212
if (!
TextSchema
.ValuesAreEqual(newValue, element.GetValue(property)))
1279
TextSchema
.IsMergeableInline(position.Parent.GetType()))
1284
TextSchema
.IsMergeableInline(position.Parent.GetType()))
1299
TextSchema
.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType()))
1308
TextSchema
.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType()))
1444
if (parent is Inline ||
TextSchema
.AllowsParagraphMerging(parent.GetType()))
1766
while (splitPosition.Parent != null &&
TextSchema
.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor &&
1782
for (int i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1784
DependencyProperty property =
TextSchema
.StructuralCharacterProperties[i];
1814
for (i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1816
DependencyProperty inheritableProperty =
TextSchema
.StructuralCharacterProperties[i];
1817
if (!
TextSchema
.ValuesAreEqual(inline.GetValue(inheritableProperty), inline.Parent.GetValue(inheritableProperty)))
1821
return (i <
TextSchema
.StructuralCharacterProperties.Length);
1829
for (i = 0; i <
TextSchema
.StructuralCharacterProperties.Length; i++)
1831
DependencyProperty inheritableProperty =
TextSchema
.StructuralCharacterProperties[i];
1836
return (i <
TextSchema
.StructuralCharacterProperties.Length);
2022
if (
TextSchema
.IsMergeableInline(topmostSpan.GetType()) &&
TextSchema
.IsKnownType(topmostSpan.GetType()) && !HasWriteableLocalPropertyValues(topmostSpan))
2037
parent != null &&
TextSchema
.IsMergeableInline(parent.GetType());
2119
TextSchema
.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements
2267
if (!
TextSchema
.IsMergeableInline(parent.GetType()))
2278
if (!
TextSchema
.IsMergeableInline(parent.GetType()))
System\Windows\Documents\TextRangeEditLists.cs (8)
80
Invariant.Assert(
TextSchema
.AllowsParagraphMerging(parentBlock.GetType()));
110
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)
634
if (ancestor is List || ancestor is Inline && !
TextSchema
.IsMergeableInline(ancestor.GetType()))
771
Invariant.Assert(
TextSchema
.IsInTextContent(position), "position must be in text content now");
876
if (
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/typeof(Inline)))
882
Invariant.Assert(
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/typeof(Block)), "Expecting valid parent-child relationship");
2300
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Paragraph));
2301
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Paragraph));
System\Windows\Documents\TextRangeSerialization.cs (27)
289
if (
TextSchema
.IsBreak(textReader.ParentType))
539
Type elementTypeStandardized =
TextSchema
.GetStandardElementType(elementType, reduceElement);
557
elementTypeStandardized =
TextSchema
.GetStandardElementType(elementType, /*reduceElement:*/true);
565
bool customTextElement = preserveTextElements && !
TextSchema
.IsKnownType(elementType);
725
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(FlowDocument));
774
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(elementTypeStandardized);
796
!
TextSchema
.ValuesAreEqual(innerValue, outerValue)) // or the element really affects the property
831
DependencyProperty[] elementProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
922
write = (metadata == null) || !(
TextSchema
.ValuesAreEqual(propertyValue, /*defaultValue*/metadata.DefaultValue) && localValue == DependencyProperty.UnsetValue);
958
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(elementTypeStandardized);
959
DependencyProperty[] nonInheritableProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
971
!
TextSchema
.IsKnownType(locallySetProperty.OwnerType))
1115
Type elementTypeStandardized =
TextSchema
.GetStandardElementType(element.GetType(), reduceElement);
1116
DependencyProperty[] elementProperties =
TextSchema
.GetNoninheritableProperties(elementTypeStandardized);
1168
DependencyProperty[] imageProperties =
TextSchema
.ImageProperties;
1415
TextSchema
.IsFormattingType(positionBeforeParagraph.Parent.GetType()))
1420
TextSchema
.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType()))
1568
if (
TextSchema
.IsCharacterProperty(property) &&
1569
TextSchema
.IsParagraphProperty(property))
1573
if (
TextSchema
.IsBlock(propertyBag.GetType()))
1582
else if (
TextSchema
.IsCharacterProperty(property))
1586
else if (
TextSchema
.IsParagraphProperty(property))
1600
if (
TextSchema
.ValuesAreEqual(start.Parent.GetValue(property), value))
1617
!
TextSchema
.ValuesAreEqual(element.GetValue(property), element.Parent.GetValue(property)))
1636
if (!
TextSchema
.ValuesAreEqual(value, element.GetValue(property)))
1639
if (!
TextSchema
.ValuesAreEqual(value, element.GetValue(property)))
1726
typeof(Inline).IsAssignableFrom(commonAncestor.ParentType) &&
TextSchema
.HasTextDecorations(commonAncestor.GetValue(Inline.TextDecorationsProperty)))
System\Windows\Documents\TextSchema.cs (3)
104
if (
TextSchema
.HasHyperlinkAncestor(parent) &&
105
TextSchema
.HasIllegalHyperlinkDescendant(child, throwIfIllegalHyperlinkDescendent))
128
if (
TextSchema
.HasHyperlinkAncestor(parent))
System\windows\Documents\TextSelection.cs (8)
170
if (this.IsEmpty &&
TextSchema
.IsCharacterProperty(formattingProperty))
473
TextSchema
.IsBreak(caretPosition.GetElementType(LogicalDirection.Backward))))
1272
if (!
TextSchema
.IsParagraphProperty(formattingProperty) && !
TextSchema
.IsCharacterProperty(formattingProperty))
1278
if (this.IsEmpty &&
TextSchema
.IsCharacterProperty(formattingProperty) &&
1477
DependencyProperty[] inheritableProperties =
TextSchema
.GetInheritableProperties(typeof(Inline));
1478
DependencyProperty[] noninheritableProperties =
TextSchema
.GetNoninheritableProperties(typeof(Span));
1561
Invariant.Assert(
TextSchema
.IsCharacterProperty(propertyEntry.Property));
System\Windows\Documents\ValidationHelper.cs (1)
106
if (!
TextSchema
.IsValidChild(/*position:*/position, /*childType:*/child.GetType()))