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