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