187 references to TextSchema
PresentationFramework (187)
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (1)
800!TextSchema.IsFormattingType(pointer.ParentType))
System\Windows\Controls\RichTextBox.cs (6)
635DependencyProperty[] inheritableFormattingProperties = TextSchema.GetInheritableProperties(typeof(FlowDocument)); 643DependencyProperty[] inheritableBehavioralProperties = TextSchema.BehavioralProperties; 662DependencyProperty[] inheritableFormattingProperties = TextSchema.GetInheritableProperties(typeof(FlowDocument)); 676DependencyProperty[] inheritableBehavioralProperties = TextSchema.BehavioralProperties; 704if (!TextSchema.ValuesAreEqual(inheritedValue, defaultValue)) 708if (!TextSchema.ValuesAreEqual(inheritedValue, defaultValue))
System\Windows\Controls\TextBlock.cs (1)
137if (!TextSchema.IsValidChildOfContainer(parentType, /*childType*/valueType))
System\Windows\Documents\FixedTextView.cs (1)
1193while (TextSchema.IsFormattingType( textPointer.GetElementType(dir)) )
System\Windows\Documents\FlowDocument.cs (1)
1627if (!TextSchema.IsValidChildOfContainer(/*parentType:*/_typeofThis, /*childType:*/value.GetType()))
System\Windows\Documents\InlineCollection.cs (2)
161TextSchema.ValidateChild((TextElement)this.Parent, child, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */); 165if (!TextSchema.IsValidChildOfContainer(this.Parent.GetType(), child.GetType()))
System\Windows\Documents\Span.cs (1)
144Invariant.Assert(TextSchema.IsValidChild(/*position*/start, /*childType*/typeof(Span)));
System\Windows\Documents\Speller.cs (2)
1802TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward))) 1807TextSchema.IsFormattingType(pointer.ParentType))
System\windows\Documents\TextEditorCharacters.cs (4)
74if (!TextSchema.IsParagraphProperty(formattingProperty) && !TextSchema.IsCharacterProperty(formattingProperty)) 82if (TextSchema.IsStructuralCharacterProperty(formattingProperty) && 220if (!TextSchema.HasTextDecorations(textDecorations))
System\windows\Documents\TextEditorSelection.cs (1)
2023while (TextSchema.IsFormattingType(position.ParentType))
System\windows\Documents\TextEditorSpelling.cs (1)
273if (TextSchema.IsFormattingType(position.GetElementType(direction)))
System\windows\Documents\TextEditorTyping.cs (4)
809if (TextSchema.IsBlock(parentType)) 811if (TextSchema.IsParagraphOrBlockUIContainer(parentType)) 855TextSchema.IsParagraphOrBlockUIContainer(navigator.ParentType))) 1879TextSchema.HasHyperlinkAncestor((TextElement)pointer.Parent))
System\Windows\Documents\TextElement.cs (4)
795TextSchema.ValidateChild(/*parent:*/this, /*child:*/te, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */); 827if (TextSchema.IsValidChild(/*parent:*/this, /*childType:*/typeof(InlineUIContainer))) 861if (TextSchema.IsValidChild(/*parent:*/this, /*childType:*/typeof(string))) 868if (TextSchema.IsValidChild(/*parent:*/this, /*childType:*/typeof(Run)))
System\Windows\Documents\TextFindEngine.cs (4)
898TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward))) 903TextSchema.IsFormattingType(pointer.ParentType)) 913TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Backward))) 918TextSchema.IsFormattingType(pointer.ParentType))
System\Windows\Documents\TextPointer.cs (7)
1278if (TextSchema.IsInTextContent(this)) 1318if (!TextSchema.IsInTextContent(this)) 1420if (!TextSchema.IsValidChildOfContainer(containerType, typeof(Paragraph))) 1613TextSchema.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1723while (ancestor != null && TextSchema.IsMergeableInline(ancestor.GetType())) 3540bool isValidChild = TextSchema.ValidateChild(position, /*childType*/inline.GetType(), false /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */); 3567Invariant.Assert(TextSchema.IsValidChild(position, /*childType*/inline.GetType()));
System\Windows\Documents\TextPointerBase.cs (20)
179if (TextSchema.IsValidChild(/*position*/backwardPosition, /*childType*/typeof(Run))) 192backwardContext == TextPointerContext.ElementStart && TextSchema.IsNonFormattingInline(forwardType) && 196forwardContext == TextPointerContext.ElementEnd && TextSchema.IsNonFormattingInline(backwardType) && 201TextSchema.IsNonFormattingInline(backwardType) && TextSchema.IsNonFormattingInline(forwardType) 205typeof(Inline).IsAssignableFrom(backwardType) && !TextSchema.IsMergeableInline(backwardType) && !typeof(Run).IsAssignableFrom(forwardType) && 209typeof(Inline).IsAssignableFrom(forwardType) && !TextSchema.IsMergeableInline(forwardType) && !typeof(Run).IsAssignableFrom(backwardType) && 365if (typeof(Inline).IsAssignableFrom(elementType) && !TextSchema.IsMergeableInline(elementType)) 427if (TextSchema.IsFormattingType(position.GetElementType(direction))) 430while (TextSchema.IsFormattingType(position.GetElementType(direction))) 740if (TextSchema.IsParagraphOrBlockUIContainer(pointer.ParentType)) 988while (TextSchema.IsFormattingType(thisNavigator.GetElementType(direction))) 1013while (TextSchema.IsFormattingType(thisNavigator.GetElementType(direction))) 1023while (TextSchema.IsFormattingType(thisNavigator.GetElementType(LogicalDirection.Forward)) 1205while (TextSchema.IsMergeableInline(thisNavigator.GetElementType(direction))) 1216TextSchema.IsMergeableInline(thisNavigator.GetElementType(oppositeDirection))) 1285while (TextSchema.IsMergeableInline(thisNavigator.ParentType)) 1305else if (TextSchema.IsValidChild(/*position*/position, /*childType*/typeof(string))) 1496else if (TextSchema.IsMergeableInline(position.ParentType)) 1537if (!TextSchema.IsFormattingType(neighbor))
System\Windows\Documents\TextRange.cs (7)
781if (!TextSchema.IsCharacterProperty(formattingProperty) && 782!TextSchema.IsParagraphProperty(formattingProperty)) 815!TextSchema.IsPropertyIncremental(formattingProperty)) 849if (!TextSchema.IsCharacterProperty(formattingProperty) && 850!TextSchema.IsParagraphProperty(formattingProperty)) 1640else if (TextSchema.IsCharacterProperty(formattingProperty)) 1644else if (TextSchema.IsParagraphProperty(formattingProperty))
System\Windows\Documents\TextRangeBase.cs (6)
374if (TextSchema.IsCharacterProperty(formattingProperty)) 380Invariant.Assert(TextSchema.IsParagraphProperty(formattingProperty), "The property is expected to be one of either character or paragraph formatting one"); 404if (!TextSchema.ValuesAreEqual(value, startValue)) 485if (!TextSchema.ValuesAreEqual(value, startValue)) 1356TextSchema.IsValidChild(/*position*/insertPosition, /*childType*/typeof(Block)) && 1369Invariant.Assert(TextSchema.IsInTextContent(insertPosition), "range.Start is expected to be in text content");
System\Windows\Documents\TextRangeEdit.cs (61)
55Invariant.Assert(splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType())); 92DependencyProperty[] inheritableProperties = TextSchema.GetInheritableProperties(typeof(Inline)); 97if (TextSchema.IsStructuralCharacterProperty(property)) 107if (!TextSchema.ValuesAreEqual(firstInline.GetValue(property), secondInline.GetValue(property))) 133DependencyProperty[] noninheritableProperties = TextSchema.GetNoninheritableProperties(typeof(Span)); 137if (!TextSchema.ValuesAreEqual(firstElement.GetValue(property), secondElement.GetValue(property))) 171while (inline != null && inline.IsEmpty && !TextSchema.IsFormattingType(inline.GetType())) 195((inline.NextInline != null && TextSchema.IsFormattingType(inline.NextInline.GetType())) || 196(inline.PreviousInline != null && TextSchema.IsFormattingType(inline.PreviousInline.GetType())))) 232start.Parent == end.Parent && TextSchema.ValuesAreEqual(start.Parent.GetValue(formattingProperty), value)) 241if (TextSchema.IsStructuralCharacterProperty(formattingProperty)) 263TextSchema.IsMergeableInline(position.Parent.GetType())) 268TextSchema.IsMergeableInline(position.Parent.GetType())) 282if (TextSchema.IsFormattingType(firstInline.GetType()) && firstInline.TextRange.IsEmpty) 287else if (TextSchema.IsFormattingType(secondInline.GetType()) && secondInline.TextRange.IsEmpty) 292else if (TextSchema.IsKnownType(firstInline.GetType()) && TextSchema.IsKnownType(secondInline.GetType()) && 294TextSchema.IsMergeableInline(firstInline.GetType()) && TextSchema.IsMergeableInline(secondInline.GetType()) 327TextSchema.IsMergeableInline(inline.Parent.GetType()) && 328TextSchema.IsKnownType(inline.Parent.GetType()) && 345DependencyProperty[] inheritableProperties = TextSchema.GetInheritableProperties(typeof(Span)); 353if (!TextSchema.ValuesAreEqual(inlineValue, parentSpanValue)) 361if (!TextSchema.ValuesAreEqual(inlineValue, outerValue)) 370DependencyProperty[] nonInheritableProperties = TextSchema.GetNoninheritableProperties(typeof(Span)); 431else if (parent is Span && TextSchema.IsKnownType(parent.GetType())) 475if (property.ReadOnly || TextSchema.IsNonFormattingCharacterProperty(property)) 491DependencyProperty[] nonFormattingCharacterProperties = TextSchema.GetNonFormattingCharacterProperties(); 497if (!TextSchema.ValuesAreEqual(value, outerContextValue)) 591Invariant.Assert(position.TextContainer.Parent == null || TextSchema.IsValidChildOfContainer(position.TextContainer.Parent.GetType(), typeof(Paragraph))); 679if (!TextSchema.IsValidChild(/*position*/position, /*childType*/typeof(LineBreak))) 685if (TextSchema.IsInTextContent(position)) 691Invariant.Assert(TextSchema.IsValidChild(/*position*/position, /*childType*/typeof(LineBreak)), 789if (TextSchema.IsParagraphOrBlockUIContainer(block.GetType())) 920TextSchema.IsStructuralCharacterProperty(property) && 921!TextSchema.ValuesAreEqual(currentValue, newValue)) 955if (!TextSchema.ValuesAreEqual(nextChild.GetValue(property), firstChildValue)) 961if (TextSchema.ValuesAreEqual(firstChildValue, currentValue)) 1205if (!TextSchema.ValuesAreEqual(newValue, currentValue)) 1211if (!TextSchema.ValuesAreEqual(newValue, element.GetValue(property))) 1278TextSchema.IsMergeableInline(position.Parent.GetType())) 1283TextSchema.IsMergeableInline(position.Parent.GetType())) 1298TextSchema.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1307TextSchema.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType())) 1443if (parent is Inline || TextSchema.AllowsParagraphMerging(parent.GetType())) 1765while (splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor && 1781for (int i = 0; i < TextSchema.StructuralCharacterProperties.Length; i++) 1783DependencyProperty property = TextSchema.StructuralCharacterProperties[i]; 1813for (i = 0; i < TextSchema.StructuralCharacterProperties.Length; i++) 1815DependencyProperty inheritableProperty = TextSchema.StructuralCharacterProperties[i]; 1816if (!TextSchema.ValuesAreEqual(inline.GetValue(inheritableProperty), inline.Parent.GetValue(inheritableProperty))) 1820return (i < TextSchema.StructuralCharacterProperties.Length); 1828for (i = 0; i < TextSchema.StructuralCharacterProperties.Length; i++) 1830DependencyProperty inheritableProperty = TextSchema.StructuralCharacterProperties[i]; 1835return (i < TextSchema.StructuralCharacterProperties.Length); 2021if (TextSchema.IsMergeableInline(topmostSpan.GetType()) && TextSchema.IsKnownType(topmostSpan.GetType()) && !HasWriteableLocalPropertyValues(topmostSpan)) 2036parent != null && TextSchema.IsMergeableInline(parent.GetType()); 2118TextSchema.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements 2266if (!TextSchema.IsMergeableInline(parent.GetType())) 2277if (!TextSchema.IsMergeableInline(parent.GetType()))
System\Windows\Documents\TextRangeEditLists.cs (8)
79Invariant.Assert(TextSchema.AllowsParagraphMerging(parentBlock.GetType())); 109Invariant.Assert(TextSchema.AllowsParagraphMerging(previousBlock.GetType())); 637if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType())) 657if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType())) 679!TextSchema.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/startListItem.List.GetValue(Paragraph.FlowDirectionProperty))) 699!TextSchema.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/endListItem.List.GetValue(Paragraph.FlowDirectionProperty))) 730(!TextSchema.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/startListItem.List.GetValue(Paragraph.FlowDirectionProperty)))) 738(!TextSchema.ValuesAreEqual(/*newValue*/newFlowDirectionValue, /*currentValue*/endListItem.List.GetValue(Paragraph.FlowDirectionProperty))))
System\Windows\Documents\TextRangeEditTables.cs (6)
633if (ancestor is List || ancestor is Inline && !TextSchema.IsMergeableInline(ancestor.GetType())) 770Invariant.Assert(TextSchema.IsInTextContent(position), "position must be in text content now"); 875if (TextSchema.IsValidChild(/*position:*/position, /*childType:*/typeof(Inline))) 881Invariant.Assert(TextSchema.IsValidChild(/*position:*/position, /*childType:*/typeof(Block)), "Expecting valid parent-child relationship"); 2299DependencyProperty[] inheritableProperties = TextSchema.GetInheritableProperties(typeof(Paragraph)); 2300DependencyProperty[] nonInheritableProperties = TextSchema.GetNoninheritableProperties(typeof(Paragraph));
System\Windows\Documents\TextRangeSerialization.cs (27)
288if (TextSchema.IsBreak(textReader.ParentType)) 538Type elementTypeStandardized = TextSchema.GetStandardElementType(elementType, reduceElement); 556elementTypeStandardized = TextSchema.GetStandardElementType(elementType, /*reduceElement:*/true); 564bool customTextElement = preserveTextElements && !TextSchema.IsKnownType(elementType); 724DependencyProperty[] inheritableProperties = TextSchema.GetInheritableProperties(typeof(FlowDocument)); 773DependencyProperty[] inheritableProperties = TextSchema.GetInheritableProperties(elementTypeStandardized); 795!TextSchema.ValuesAreEqual(innerValue, outerValue)) // or the element really affects the property 830DependencyProperty[] elementProperties = TextSchema.GetNoninheritableProperties(elementTypeStandardized); 921write = (metadata == null) || !(TextSchema.ValuesAreEqual(propertyValue, /*defaultValue*/metadata.DefaultValue) && localValue == DependencyProperty.UnsetValue); 957DependencyProperty[] inheritableProperties = TextSchema.GetInheritableProperties(elementTypeStandardized); 958DependencyProperty[] nonInheritableProperties = TextSchema.GetNoninheritableProperties(elementTypeStandardized); 970!TextSchema.IsKnownType(locallySetProperty.OwnerType)) 1114Type elementTypeStandardized = TextSchema.GetStandardElementType(element.GetType(), reduceElement); 1115DependencyProperty[] elementProperties = TextSchema.GetNoninheritableProperties(elementTypeStandardized); 1167DependencyProperty[] imageProperties = TextSchema.ImageProperties; 1414TextSchema.IsFormattingType(positionBeforeParagraph.Parent.GetType())) 1419TextSchema.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType())) 1567if (TextSchema.IsCharacterProperty(property) && 1568TextSchema.IsParagraphProperty(property)) 1572if (TextSchema.IsBlock(propertyBag.GetType())) 1581else if (TextSchema.IsCharacterProperty(property)) 1585else if (TextSchema.IsParagraphProperty(property)) 1599if (TextSchema.ValuesAreEqual(start.Parent.GetValue(property), value)) 1616!TextSchema.ValuesAreEqual(element.GetValue(property), element.Parent.GetValue(property))) 1635if (!TextSchema.ValuesAreEqual(value, element.GetValue(property))) 1638if (!TextSchema.ValuesAreEqual(value, element.GetValue(property))) 1725typeof(Inline).IsAssignableFrom(commonAncestor.ParentType) && TextSchema.HasTextDecorations(commonAncestor.GetValue(Inline.TextDecorationsProperty)))
System\Windows\Documents\TextSchema.cs (3)
103if (TextSchema.HasHyperlinkAncestor(parent) && 104TextSchema.HasIllegalHyperlinkDescendant(child, throwIfIllegalHyperlinkDescendent)) 127if (TextSchema.HasHyperlinkAncestor(parent))
System\windows\Documents\TextSelection.cs (8)
169if (this.IsEmpty && TextSchema.IsCharacterProperty(formattingProperty)) 460TextSchema.IsBreak(caretPosition.GetElementType(LogicalDirection.Backward)))) 1256if (!TextSchema.IsParagraphProperty(formattingProperty) && !TextSchema.IsCharacterProperty(formattingProperty)) 1262if (this.IsEmpty && TextSchema.IsCharacterProperty(formattingProperty) && 1461DependencyProperty[] inheritableProperties = TextSchema.GetInheritableProperties(typeof(Inline)); 1462DependencyProperty[] noninheritableProperties = TextSchema.GetNoninheritableProperties(typeof(Span)); 1545Invariant.Assert(TextSchema.IsCharacterProperty(propertyEntry.Property));
System\Windows\Documents\ValidationHelper.cs (1)
105if (!TextSchema.IsValidChild(/*position:*/position, /*childType:*/child.GetType()))