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