6 types derived from TextElement
PresentationFramework (6)
System\Windows\Documents\Block.cs (1)
26public abstract class Block : TextElement
System\Windows\Documents\Inline.cs (1)
17public abstract class Inline : TextElement
System\Windows\Documents\ListItem.cs (1)
24public class ListItem : TextElement
System\Windows\Documents\TableCell.cs (1)
47public class TableCell : TextElement, IIndexedChild<TableRow>
System\Windows\Documents\TableRow.cs (1)
38public class TableRow : TextElement, IAddChild, IIndexedChild<TableRowGroup>, IAcceptInsertion
System\Windows\Documents\TableRowGroup.cs (1)
44public class TableRowGroup : TextElement, IAddChild, IIndexedChild<Table>, IAcceptInsertion
560 references to TextElement
PresentationFramework (556)
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (2)
505TextElement textElement = startNode as TextElement;
MS\Internal\Documents\ContentElementCollection.cs (1)
28where TParent : TextElement, IAcceptInsertion
MS\Internal\Documents\ContentHostHelper.cs (4)
49if (contentElement is TextElement) 51textContainer = ((TextElement)contentElement).TextContainer; 59ich = GetICHFromFlowDocument((TextElement)contentElement, (FlowDocument)parent); 88private static IContentHost GetICHFromFlowDocument(TextElement contentElement, FlowDocument flowDocument)
MS\Internal\Documents\DocumentViewerHelper.cs (4)
396e.TargetElement is TextElement) 398contextMenuPosition = ((TextElement)e.TargetElement).ContentStart; 407else if (e.TargetElement is TextElement) 409contextMenuPosition = ((TextElement)e.TargetElement).ContentStart;
MS\Internal\Documents\IIndexedChild.cs (2)
11/// Classes comprising structure of <see cref="Table"/> are <see cref="TextElement"/> derived 28where TParent : TextElement
MS\Internal\Documents\TableTextElementCollectionInternal.cs (2)
22where TParent : TextElement, IAcceptInsertion 23where TElementType : TextElement, IIndexedChild<TParent>
MS\Internal\Documents\TextContainerHelper.cs (18)
401while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 444while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 460while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 505internal static TextContentRange GetTextContentRangeForTextElement(TextElement textElement) 516internal static TextContentRange GetTextContentRangeForTextElementEdge(TextElement textElement, ElementEdge edge) 544if (element is TextElement) 546textPointer = ((TextElement)element).ContentStart; 566if (element is TextElement) 568length = ((TextElement)element).SymbolCount; 607TextElement uiContainer = embeddedObject.Parent as TextElement; 629TextElement textElement; 631textElement = element as TextElement; 683TextElement textElement; 685textElement = element as TextElement; 710if (fe.Parent is TextElement) 712TextElement uiContainer = (TextElement)fe.Parent;
MS\Internal\Documents\TextDocumentView.cs (6)
801position = ((TextElement)rowResult.Element).ElementEnd; 817position = ((TextElement)paragraph.Element).ContentStart; 3479TextElement textElement = paragraphResult.Element as TextElement; 3509TextElement textElement = paragraphResult.Element as TextElement;
MS\Internal\PtsHost\BaseParagraph.cs (1)
301if (this is TextParagraph && Element is TextElement)
MS\Internal\PtsHost\ContainerParaClient.cs (3)
195Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 268TextElement elementOwner = this.Paragraph.Element as TextElement;
MS\Internal\PtsHost\ContainerParagraph.cs (3)
1040if(!(Element is TextElement) || ((TextElement)Element).ContentStart != textPointer) 1065TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\FigureParaClient.cs (3)
365Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 539Paragraph.Element as TextElement, ElementEdge.BeforeStart)); 547Paragraph.Element as TextElement, ElementEdge.AfterEnd));
MS\Internal\PtsHost\FloaterBaseParagraph.cs (1)
43protected FloaterBaseParagraph(TextElement element, StructuralCache structuralCache)
MS\Internal\PtsHost\FloaterParaClient.cs (3)
371Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 546Paragraph.Element as TextElement, ElementEdge.BeforeStart)); 554Paragraph.Element as TextElement, ElementEdge.AfterEnd));
MS\Internal\PtsHost\FloaterParagraph.cs (1)
43internal FloaterParagraph(TextElement element, StructuralCache structuralCache)
MS\Internal\PtsHost\FlowDocumentPage.cs (5)
331if (child is TextElement) 333TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 940if (e is TextElement) 942if ((e as TextElement).TextContainer == _structuralCache.TextContainer) 945elementPosition = new TextPointer((e as TextElement).ElementStart);
MS\Internal\PtsHost\LineBase.cs (4)
145TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 267TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
MS\Internal\PtsHost\ListParaClient.cs (1)
62Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty);
MS\Internal\PtsHost\ListParagraph.cs (1)
83TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\MbpInfo.cs (2)
32MbpInfo mbp = new MbpInfo((TextElement)o); 101private MbpInfo(TextElement block)
MS\Internal\PtsHost\SubpageParaClient.cs (3)
298Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 513TextElement elementOwner = this.Paragraph.Element as TextElement;
MS\Internal\PtsHost\TableParaClient.cs (6)
227Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 522TextElement elementOwner = this.Paragraph.Element as TextElement; 1851rowGroupBackgroundBrush = (Brush)tableRowGroup.GetValue(TextElement.BackgroundProperty); 1870rowGroupBackgroundBrush = (Brush)tableRowGroup.GetValue(TextElement.BackgroundProperty); 1898Brush rowBackgroundBrush = (Brush)row.GetValue(TextElement.BackgroundProperty);
MS\Internal\PtsHost\TextParaClient.cs (2)
1889endOfParaGlyphWidth = ((double)TextParagraph.Element.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier); 1999endOfParaGlyphWidth = ((double)TextParagraph.Element.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier);
MS\Internal\PtsHost\TextParagraph.cs (8)
890TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 905private List<TextElement> GetAttachedObjectElements(int dcpFirst, int dcpLast) 907List<TextElement> attachedElements = new List<TextElement>(); 920TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 946List<TextElement> textElements = GetAttachedObjectElements(dcpFirst, dcpLast); 963List<TextElement> textElements = GetAttachedObjectElements(dcpFirst, dcpLast); 967TextElement textElement = textElements[index];
MS\Internal\PtsHost\UIElementParaClient.cs (1)
137Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty);
MS\Internal\PtsHost\UIElementParagraph.cs (1)
41internal UIElementParagraph(TextElement element, StructuralCache structuralCache)
MS\Internal\Text\ComplexLine.cs (5)
307element = position.Parent as TextElement; 390TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 481TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
MS\Internal\Text\DynamicPropertyReader.cs (12)
46FontFamily fontFamily = (FontFamily) element.GetValue(TextElement.FontFamilyProperty); 47FontStyle fontStyle = (FontStyle) element.GetValue(TextElement.FontStyleProperty); 48FontWeight fontWeight = (FontWeight) element.GetValue(TextElement.FontWeightProperty); 49FontStretch fontStretch = (FontStretch) element.GetValue(TextElement.FontStretchProperty); 58FontStyle fontStyle = (FontStyle) element.GetValue(TextElement.FontStyleProperty); 59FontWeight fontWeight = (FontWeight) element.GetValue(TextElement.FontWeightProperty); 60FontStretch fontStretch = (FontStretch) element.GetValue(TextElement.FontStretchProperty); 124return GetCollectionValue(element, TextElement.TextEffectsProperty) as TextEffectCollection; 213FontFamily fontFamily = (FontFamily)d.GetValue(TextElement.FontFamilyProperty); 214double fontSize = (double)d.GetValue(TextElement.FontSizeProperty); 241backgroundBrush = (Brush)element.GetValue(TextElement.BackgroundProperty); 264backgroundBrush = (Brush)position.GetValue(TextElement.BackgroundProperty);
MS\Internal\Text\TextProperties.cs (7)
118_typographyProperties = TextElement.GetTypographyProperties(target); 206_fontSize = (double)target.GetValue(TextElement.FontSizeProperty); 207_foreground = (Brush) target.GetValue(TextElement.ForegroundProperty); 264return TextElement.GetTypographyProperties(element); 277return TextElement.GetTypographyProperties(element); 285TextElement te = element as TextElement;
System\Windows\Automation\Peers\TextElementAutomationPeer.cs (14)
30public TextElementAutomationPeer(TextElement owner) 43TextElement textElement = (TextElement)Owner; 52TextElement textElement = (TextElement)Owner; 99TextElement textElement = (TextElement)Owner; 153TextElement textElement = (TextElement)Owner; 173private Rect CalculateVisibleRect(ITextView textView, TextElement textElement, TextPointer startPointer, TextPointer endPointer) 214TextElement textElement = (TextElement)Owner; 225TextElement textElement = (TextElement)Owner;
System\Windows\Controls\AccessText.cs (8)
155TextElement.FontFamilyProperty.AddOwner(typeof(AccessText)); 174TextElement.FontStyleProperty.AddOwner(typeof(AccessText)); 189TextElement.FontWeightProperty.AddOwner(typeof(AccessText)); 204TextElement.FontStretchProperty.AddOwner(typeof(AccessText)); 219TextElement.FontSizeProperty.AddOwner(typeof(AccessText)); 236TextElement.ForegroundProperty.AddOwner(typeof(AccessText)); 251TextElement.BackgroundProperty.AddOwner( 291TextElement.TextEffectsProperty.AddOwner(
System\Windows\Controls\ComboBox.cs (2)
1607TextElement textElement; 1622else if ((textElement = d as TextElement) != null)
System\Windows\Controls\Control.cs (7)
144TextElement.ForegroundProperty.AddOwner( 168TextElement.FontFamilyProperty.AddOwner( 193TextElement.FontSizeProperty.AddOwner( 219= TextElement.FontStretchProperty.AddOwner(typeof(Control), 220new FrameworkPropertyMetadata(TextElement.FontStretchProperty.DefaultMetadata.DefaultValue, 242TextElement.FontStyleProperty.AddOwner( 266TextElement.FontWeightProperty.AddOwner(
System\Windows\Controls\DataGridTextColumn.cs (15)
115DataGridHelper.SyncColumnProperty(this, e, TextElement.FontFamilyProperty, FontFamilyProperty); 116DataGridHelper.SyncColumnProperty(this, e, TextElement.FontSizeProperty, FontSizeProperty); 117DataGridHelper.SyncColumnProperty(this, e, TextElement.FontStyleProperty, FontStyleProperty); 118DataGridHelper.SyncColumnProperty(this, e, TextElement.FontWeightProperty, FontWeightProperty); 119DataGridHelper.SyncColumnProperty(this, e, TextElement.ForegroundProperty, ForegroundProperty); 135DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontFamilyProperty, FontFamilyProperty); 138DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontSizeProperty, FontSizeProperty); 141DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontStyleProperty, FontStyleProperty); 144DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontWeightProperty, FontWeightProperty); 147DataGridHelper.SyncColumnProperty(this, textElement, TextElement.ForegroundProperty, ForegroundProperty); 300TextElement.FontFamilyProperty.AddOwner( 321TextElement.FontSizeProperty.AddOwner( 344TextElement.FontStyleProperty.AddOwner( 365TextElement.FontWeightProperty.AddOwner( 386TextElement.ForegroundProperty.AddOwner(
System\Windows\Controls\Page.cs (3)
452TextElement.ForegroundProperty.AddOwner(typeof(Page)); 471TextElement.FontFamilyProperty.AddOwner(typeof(Page)); 493TextElement.FontSizeProperty.AddOwner(typeof(Page));
System\Windows\Controls\TextAdaptor.cs (5)
600if (childElement is TextElement) 602rangeStart = ((TextElement)childElement).ElementStart; 603rangeEnd = ((TextElement)childElement).ElementEnd; 610rangeStart = ((TextElement)parent).ContentStart; 611rangeEnd = ((TextElement)parent).ContentEnd;
System\Windows\Controls\TextBlock.cs (17)
633TextElement.FontFamilyProperty.AddOwner(typeof(TextBlock)); 673TextElement.FontStyleProperty.AddOwner(typeof(TextBlock)); 712TextElement.FontWeightProperty.AddOwner(typeof(TextBlock)); 751TextElement.FontStretchProperty.AddOwner(typeof(TextBlock)); 790TextElement.FontSizeProperty.AddOwner( 833TextElement.ForegroundProperty.AddOwner( 873TextElement.BackgroundProperty.AddOwner( 913TextElement.TextEffectsProperty.AddOwner( 1771if (child is TextElement) 1773end = new TextPointer(((TextElement)child).ElementEnd); 3508else if (element is TextElement) 3510if (textBlock._complexContent.TextContainer != ((TextElement)element).TextContainer) 3654if (e is TextElement) 3656if ((e as TextElement).TextContainer == _complexContent.TextContainer) 3659position = new TextPointer((e as TextElement).ElementStart); 3719TextElement te = TextElement.ContainerTextElementField.GetValue(d);
System\Windows\Controls\TextBox.cs (1)
1879double fontSize = (double)this.GetValue(TextElement.FontSizeProperty);
System\Windows\Controls\TextRangeAdaptor.cs (7)
52TextEffectCollection effects = tp.GetValue(TextElement.TextEffectsProperty) as TextEffectCollection; 63return ColorFromBrush(tp.GetValue(TextElement.BackgroundProperty)); 163return GetFontFamilyName((FontFamily)tp.GetValue(TextElement.FontFamilyProperty), tp); 173return NativeObjectLengthToPoints((double)tp.GetValue(TextElement.FontSizeProperty)); 183FontWeight fontWeight = (FontWeight)tp.GetValue(TextElement.FontWeightProperty); 194return ColorFromBrush(tp.GetValue(TextElement.ForegroundProperty)); 271FontStyle style = (FontStyle)tp.GetValue(TextElement.FontStyleProperty);
System\Windows\Documents\FixedElement.cs (6)
69TextElement.FontFamilyProperty.AddOwner( 73TextElement.FontStyleProperty.AddOwner( 77TextElement.FontWeightProperty.AddOwner( 81TextElement.FontStretchProperty.AddOwner( 85TextElement.FontSizeProperty.AddOwner( 89TextElement.ForegroundProperty.AddOwner(
System\Windows\Documents\FixedSOMTextRun.cs (6)
235element.SetValue(TextElement.FontSizeProperty, _fontSize); 236element.SetValue(TextElement.FontWeightProperty, _fontWeight); 237element.SetValue(TextElement.FontStretchProperty, _fontStretch); 238element.SetValue(TextElement.FontStyleProperty, _fontStyle); 250element.SetValue(TextElement.FontFamilyProperty, new FontFamily(_fontFamily)); 252element.SetValue(TextElement.ForegroundProperty, _foreground);
System\Windows\Documents\FlowDocument.cs (13)
200TextElement.FontFamilyProperty.AddOwner(_typeofThis); 219TextElement.FontStyleProperty.AddOwner(_typeofThis); 234TextElement.FontWeightProperty.AddOwner(_typeofThis); 249TextElement.FontStretchProperty.AddOwner(_typeofThis); 264TextElement.FontSizeProperty.AddOwner( 282TextElement.ForegroundProperty.AddOwner( 298TextElement.BackgroundProperty.AddOwner( 317TextElement.TextEffectsProperty.AddOwner( 894else if (element is TextElement) 896textPointer = ((TextElement)element).ContentStart; 1100_typographyPropertiesGroup = TextElement.GetTypographyProperties(this); 1646if (value is TextElement && ((TextElement)value).Parent != null)
System\Windows\Documents\InlineCollection.cs (2)
161if (this.Parent is TextElement) 163TextSchema.ValidateChild((TextElement)this.Parent, child, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
System\Windows\Documents\List.cs (1)
210textNav.MoveToPosition(((TextElement)element).ElementEnd);
System\Windows\Documents\RangeContentEnumerator.cs (1)
200_navigator.MoveToPosition(((TextElement)_navigator.Parent).ElementEnd);
System\Windows\Documents\Span.cs (4)
134TextElement commonAncestor = TextElement.GetCommonAncestor((TextElement)start.Parent, (TextElement)end.Parent);
System\Windows\Documents\TextContainer.cs (17)
216TextElement textElement; 230textElement = position.Parent as TextElement; 257TextElement textElement; 277textElement = position.Parent as TextElement; 927TextElement textElement = position.Parent as TextElement; 937internal void InsertElementInternal(TextPointer startPosition, TextPointer endPosition, TextElement element) 1579internal void ExtractElementInternal(TextElement element) 2100TextElement textElement = logicalTreeNode as TextElement; 2404TextElement textElement = startPosition.Parent as TextElement; 2768private char[] ExtractElementInternal(TextElement element, bool deep, out ExtractChangeEventArgs extractChangeEventArgs) 3256TextElement element; 3265element = position.Parent as TextElement; 3422TextElement adjacentElement = startPosition.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
System\windows\Documents\TextEditorCharacters.cs (14)
190object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontWeightProperty); 193TextEditorCharacters._OnApplyProperty(This, TextElement.FontWeightProperty, fontWeight); 210object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontStyleProperty); 213TextEditorCharacters._OnApplyProperty(This, TextElement.FontStyleProperty, fontStyle); 312double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 327TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize); 333TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.IncreaseByAbsoluteValue); 354double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 368TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize); 374TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.DecreaseByAbsoluteValue); 388TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, args.Parameter); 401TextEditorCharacters._OnApplyProperty(This, TextElement.FontFamilyProperty, args.Parameter); 414TextEditorCharacters._OnApplyProperty(This, TextElement.ForegroundProperty, args.Parameter); 427TextEditorCharacters._OnApplyProperty(This, TextElement.BackgroundProperty, args.Parameter);
System\windows\Documents\TextEditorContextMenu.cs (4)
73else if ((This.Selection.IsEmpty || e.TargetElement is TextElement) && 86TextElement element = start.Parent as TextElement; 96element = element.Parent as TextElement;
System\windows\Documents\TextEditorCopyPaste.cs (6)
719if ((element is Section || element is Span) && PasteTextElement(This, (TextElement)element)) 795TextElement textElement = WpfPayload.LoadElement(memoryStream) as TextElement; 885private static bool PasteTextElement(TextEditor This, TextElement sectionOrSpan) 927TextElement flowContent = xamlObject as TextElement;
System\windows\Documents\TextEditorDragDrop.cs (1)
430object fontStylePropertyValue = dragPosition.GetValue(TextElement.FontStyleProperty);
System\windows\Documents\TextEditorSelection.cs (1)
2257double breakWidth = (double)innerMovingPosition.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier;
System\windows\Documents\TextEditorTyping.cs (5)
1453TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1456parent = parent.Parent as TextElement; 1900pointer.Parent is TextElement && 1901TextSchema.HasHyperlinkAncestor((TextElement)pointer.Parent))
System\Windows\Documents\TextEffectResolver.cs (1)
170_element.SetValue(TextElement.TextEffectsProperty, textEffects);
System\Windows\Documents\TextElement.cs (33)
51typographyProperties[i].OverrideMetadata(typeof(TextElement), new FrameworkPropertyMetadata(typographyChanged)); 290internal static readonly UncommonField<TextElement> ContainerTextElementField = new UncommonField<TextElement>(); 463typeof(TextElement), 513typeof(TextElement), 558typeof(TextElement), 603typeof(TextElement), 648typeof(TextElement), 697typeof(TextElement), 743typeof(TextElement), 764typeof(TextElement), 807TextElement te = value as TextElement; 1111TextElement child = children.Current as TextElement; 1126internal static TextElement GetCommonAncestor(TextElement element1, TextElement element2) 1132TextElement element; 1135for (element = element1; element.Parent is TextElement; element = (TextElement)element.Parent) 1139for (element = element2; element.Parent is TextElement; element = (TextElement)element.Parent) 1148element1 = (TextElement)element1.Parent; 1154element2 = (TextElement)element2.Parent; 1161element1 = element1.Parent as TextElement; 1162element2 = element2.Parent as TextElement; 1339((TextElement) element)._typographyPropertiesGroup = null; 1419internal TextElement NextElement 1437internal TextElement PreviousElement 1455internal TextElement FirstChildElement 1473internal TextElement LastChildElement 1536private void Append(TextElement element)
System\Windows\Documents\TextElementCollection.cs (14)
19public class TextElementCollection<TextElementType> : IList, ICollection<TextElementType> where TextElementType : TextElement 44Invariant.Assert(owner is TextElement || owner is FlowDocument || owner is TextBlock); 48Invariant.Assert(owner is TextElement); 158TextElement element; 682return _isOwnerParent ? _owner : ((TextElement)_owner).Parent; 703textContainer = ((TextElement)_owner).TextContainer; 718if (this.Parent is TextElement) 720firstChild = (TextElementType)((TextElement)this.Parent).FirstChildElement; 741if (this.Parent is TextElement) 743lastChild = (TextElementType)((TextElement)this.Parent).LastChildElement; 964this.Parent is TextElement ? ((TextElement)this.Parent).ContentStart : this.TextContainer.Start; 975this.Parent is TextElement ? ((TextElement)this.Parent).ContentEnd : this.TextContainer.End;
System\Windows\Documents\TextElementEnumerator.cs (1)
22internal class TextElementEnumerator<TextElementType> : IEnumerator<TextElementType> where TextElementType : TextElement
System\Windows\Documents\TextPointer.cs (26)
28/// <para>b) Get a <see cref="TextElement"/> scoping or adjacent a position of this TextPointer;</para> 49/// for opening and closing tags of <see cref="TextElement"/> elements, <c>EmbeddedElement</c> 64/// <see cref="TextElement.ElementStart"/> and <see cref="TextElement.ElementEnd"/>, 65/// <see cref="TextElement.ContentStart"/> and <see cref="TextElement.ContentEnd"/>, etc. 637/// muchy attention to a difference between the <see cref="TextElement"/> 800/// <para>The returned element may be both a <see cref="TextElement"/> 802/// <para><see cref="TextElement"/> object will be returned when 836/// <para>- opening or closing tag of a <see cref="TextElement"/>.</para> 898/// <para>- opening or closing tag of a <see cref="TextElement"/>.</para> 1386internal void InsertTextElement(TextElement textElement) 1740TextElement ancestor = this.Parent as TextElement; 1744ancestor = ancestor.Parent as TextElement; 2151if (!((TextElement)this.Parent).IsEmpty) // the parent may be InlineUIContainer or BlockUIContainer 2168internal TextElement GetAdjacentElementFromOuterPosition(LogicalDirection direction) 2527TextElement element; 2535element = this.Parent as TextElement; 2552element = this.Parent as TextElement; 3582TextElement element1 = position1.Parent as TextElement; 3583TextElement element2 = position2.Parent as TextElement; 3597commonAncestor = TextElement.GetCommonAncestor(element1, element2); 4122private TextElement GetElement(LogicalDirection direction)
System\Windows\Documents\TextPointerBase.cs (2)
165internal static bool IsAtPotentialRunPosition(TextElement run) 303return IsInAncestorScope(position, typeof(TextElement), typeof(AnchoredBlock));
System\Windows\Documents\TextRange.cs (3)
1086internal virtual void SetXmlVirtual(TextElement fragment) 1376TextElement fragment = xamlObject as TextElement;
System\Windows\Documents\TextRangeBase.cs (19)
446DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 451element = element is TextElement ? ((TextElement)element).Parent : null; 1578thisRange.SetXmlVirtual((TextElement)element); 1590TextElement textElement = WpfPayload.LoadElement(memoryStream) as TextElement; 1827TextElement outerAnchoredBlock = start.Parent as TextElement; 1833outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1840TextElement innerElement = end.Parent as TextElement; 1847innerElement = innerElement.Parent as TextElement; 1864outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1869outerAnchoredBlock = end.Parent as TextElement; 1875outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1882TextElement innerElement = start.Parent as TextElement; 1889innerElement = innerElement.Parent as TextElement; 1906outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement;
System\Windows\Documents\TextRangeEdit.cs (23)
31internal static TextElement InsertElementClone(TextPointer start, TextPointer end, TextElement element) 33TextElement newElement = (TextElement)Activator.CreateInstance(element.GetType()); 422TextElement parent = (TextElement)start.Parent; 526TextElement element = (TextElement)position.Parent; 533TextElement newElement; 1206private static void SetPropertyValue(TextElement element, DependencyProperty property, object currentValue, object newValue) 1290TextElement commonAncestor = position.Parent as TextElement; 1445TextElement parent = (TextElement)startPosition.Parent; 1717private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, TextElement limitingAncestor) 1748private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, bool preserveStructuralFormatting, TextElement limitingAncestor) 1886Invariant.Assert(formattingProperty == TextElement.FontSizeProperty, "Only FontSize can be incremented/decremented among character properties"); 1965ApplyStructuralInlinePropertyAcrossInline(start, end, (TextElement)commonAncestor, formattingProperty, value); 2051TextElement limit = (TextElement)conflictingParent.Parent; 2148start = SplitFormattingElements(start, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement); 2149end = SplitFormattingElements(end, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement); 2159private static void ApplyStructuralInlinePropertyAcrossInline(TextPointer start, TextPointer end, TextElement commonAncestor, DependencyProperty formattingProperty, object value)
System\Windows\Documents\TextRangeEditLists.cs (7)
80TextElement parentBlock = (TextElement)secondParagraphOrBlockUIContainer.Parent; 102TextElement previousBlock = secondParagraphOrBlockUIContainer.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as TextElement; 470TextElement parent = (TextElement)lastListItem.Parent; 475parent = (TextElement)parent.Parent;
System\Windows\Documents\TextRangeEditTables.cs (19)
112TextElement element = position.Parent as TextElement; 115element = element.Parent as TextElement; 124TextElement element = position.Parent as TextElement; 127element = element.Parent as TextElement; 136TextElement element = position.Parent as TextElement; 139element = element.Parent as TextElement; 633TextElement ancestor = insertionPosition.Parent as TextElement; 644ancestor = ancestor.Parent as TextElement; 2150TextElement commonAncestor = anchorPosition.Parent as TextElement; 2153commonAncestor = commonAncestor.Parent as TextElement; 2167TextElement commonAncestor, 2179TextElement element = position.Parent as TextElement; 2211element = element.Parent as TextElement;
System\Windows\Documents\TextRangeSerialization.cs (19)
143internal static void PasteXml(TextRange range, TextElement fragment) 224TextElement nextElement = (TextElement)textReader.GetAdjacentElement(LogicalDirection.Forward); 362Invariant.Assert(typeof(TextElement).IsAssignableFrom(pointer.ParentType), "pointer must be still in a scope of TextElement"); 431Invariant.Assert(typeof(TextElement).IsAssignableFrom(thisElement.ParentType), "thisElement is expected to be a TextElement"); 867if (property == Inline.BaselineAlignmentProperty || property == TextElement.TextEffectsProperty) 1228private static bool PasteSingleEmbeddedElement(TextRange range, TextElement fragment) 1232TextElement uiContainer = fragment.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 1261private static void PasteTextFragment(TextElement fragment, TextRange range) 1283private static void PasteNonMergeableTextFragment(TextElement fragment, TextRange range) 1300private static void PasteMergeableTextFragment(TextElement fragment, TextRange range, TextPointer insertionPosition) 1540private static void AdjustFragmentForTargetRange(TextElement fragment, TextRange range) 1561private static void ApplyContextualProperties(TextPointer start, TextPointer end, TextElement propertyBag) 1619TextElement element = (TextElement)start.Parent; 1683while (typeof(TextElement).IsAssignableFrom(runningEnd.ParentType) && !runningEnd.HasEqualScope(commonAncestor)) 1702if (typeof(TextElement).IsAssignableFrom(commonAncestor.ParentType)) 1742while (typeof(TextElement).IsAssignableFrom(navigator.ParentType))
System\Windows\Documents\TextSchema.cs (37)
48TextElement.FontFamilyProperty, 49TextElement.FontStyleProperty, 50TextElement.FontWeightProperty, 51TextElement.FontStretchProperty, 52TextElement.FontSizeProperty, 53TextElement.ForegroundProperty, 102internal static bool ValidateChild(TextElement parent, TextElement child, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 121internal static bool IsValidChild(TextElement parent, Type childType) 126internal static bool ValidateChild(TextElement parent, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 163TextElement leftElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward); 164TextElement rightElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 169if (parent is TextElement) 171return ValidateChild((TextElement)parent, childType, throwIfIllegalChild, throwIfIllegalHyperlinkDescendent); 220if (typeof(TextElement).IsAssignableFrom(position.ParentType) && 235Invariant.Assert(!typeof(TextElement).IsAssignableFrom(parentType)); 240internal static bool HasHyperlinkAncestor(TextElement element) 271return elementType.Module == typeof(System.Windows.Documents.TextElement).Module || // presentationframework 467Invariant.Assert(typeof(TextElement).IsAssignableFrom(type) || typeof(TableColumn).IsAssignableFrom(type), 887private static bool HasIllegalHyperlinkDescendant(TextElement element, bool throwIfIllegalDescendent) 897TextElement nextElement = (TextElement)start.GetAdjacentElement(LogicalDirection.Forward); 925string string1 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush1); 926string string2 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush2); 965TextElement.BackgroundProperty, 979TextElement.BackgroundProperty, 1000TextElement.BackgroundProperty, 1018TextElement.BackgroundProperty, 1032TextElement.BackgroundProperty, 1048TextElement.BackgroundProperty, 1063TextElement.BackgroundProperty, 1071TextElement.BackgroundProperty, 1087TextElement.BackgroundProperty, 1104TextElement.BackgroundProperty, 1127TextElement.BackgroundProperty, 1144TextElement.BackgroundProperty, 1151TextElement.BackgroundProperty,
System\windows\Documents\TextSelection.cs (8)
1341internal override void SetXmlVirtual(TextElement fragment) 1506noninheritableProperties[i] != TextElement.TextEffectsProperty && 1514element = ((TextElement)element).Parent; 1648backgroundPropertyValue = ((TextSelection)focusedTextSelection).GetCurrentValue(TextElement.BackgroundProperty); 2047fontStylePropertyValue = ((TextSelection)textSelection).GetCurrentValue(TextElement.FontStyleProperty); 2137object fontStylePropertyValue = GetPropertyValue(TextElement.FontStyleProperty); 2234double fontSize = (double)currentTextSelection.GetPropertyValue(TextElement.FontSizeProperty); 2235FontFamily fontFamily = (FontFamily)currentTextSelection.GetPropertyValue(TextElement.FontFamilyProperty);
System\Windows\Documents\TextServicesDisplayAttribute.cs (1)
108return ((SolidColorBrush)position.GetValue(TextElement.ForegroundProperty)).Color;
System\Windows\Documents\TextStore.cs (14)
440TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward); 859(double)UiScope.GetValue(TextElement.FontSizeProperty), 860(FontFamily)UiScope.GetValue(TextElement.FontFamilyProperty), 879(double)position.GetValue(TextElement.FontSizeProperty), 880(FontFamily)position.GetValue(TextElement.FontFamilyProperty), 1266TextElement startElement = (TextElement)((TextPointer)start).Parent; 1267TextElement endElement = (TextElement)((TextPointer)end).Parent; 1268TextElement commonAncestor = TextElement.GetCommonAncestor(startElement, endElement); 3484TextElement element = start.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
421TextElement element; 424element = (TextElement)Activator.CreateInstance(_elementType);
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
58TextElement element; 66element = (TextElement)Activator.CreateInstance(_type);
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (1)
51TextElement element;
System\Windows\Documents\TextTreeTextElementNode.cs (2)
307internal TextElement TextElement 385private TextElement _textElement;
System\Windows\Documents\TextTreeUndo.cs (1)
53internal static void CreatePropertyUndoUnit(TextElement element, DependencyPropertyChangedEventArgs e)
System\Windows\Documents\ValidationHelper.cs (2)
114if (child is TextElement) 116if (((TextElement)child).Parent != null)
System\Windows\FrameworkElement.cs (12)
2406TextElement.FontFamilyProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontFamily, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontFamily))); 2407TextElement.FontSizeProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontSize, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontSize))); 2408TextElement.FontStyleProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontStyle, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontStyle))); 2409TextElement.FontWeightProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontWeight, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontWeight))); 5547if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontFamilyProperty)) 5558if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontSizeProperty)) 5569if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontStyleProperty)) 5580if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontWeightProperty)) 5613CoerceValue(TextElement.FontFamilyProperty); 5614CoerceValue(TextElement.FontSizeProperty); 5615CoerceValue(TextElement.FontStyleProperty); 5616CoerceValue(TextElement.FontWeightProperty);
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
744case 648: t = () => typeof(TextElement); break;
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (21)
3655Type type = typeof(System.Windows.Documents.TextElement); 3656DependencyProperty dp = System.Windows.Documents.TextElement.BackgroundProperty; 3658this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3672Type type = typeof(System.Windows.Documents.TextElement); 3673DependencyProperty dp = System.Windows.Documents.TextElement.FontFamilyProperty; 3675this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3689Type type = typeof(System.Windows.Documents.TextElement); 3690DependencyProperty dp = System.Windows.Documents.TextElement.FontSizeProperty; 3692this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3706Type type = typeof(System.Windows.Documents.TextElement); 3707DependencyProperty dp = System.Windows.Documents.TextElement.FontStretchProperty; 3709this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3723Type type = typeof(System.Windows.Documents.TextElement); 3724DependencyProperty dp = System.Windows.Documents.TextElement.FontStyleProperty; 3726this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3740Type type = typeof(System.Windows.Documents.TextElement); 3741DependencyProperty dp = System.Windows.Documents.TextElement.FontWeightProperty; 3743this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3757Type type = typeof(System.Windows.Documents.TextElement); 3758DependencyProperty dp = System.Windows.Documents.TextElement.ForegroundProperty; 3760this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
10064typeof(System.Windows.Documents.TextElement),
System\Windows\Markup\KnownTypes.cs (8)
1916return System.Windows.Documents.TextElement.BackgroundProperty; 1918return System.Windows.Documents.TextElement.FontFamilyProperty; 1920return System.Windows.Documents.TextElement.FontSizeProperty; 1922return System.Windows.Documents.TextElement.FontStretchProperty; 1924return System.Windows.Documents.TextElement.FontStyleProperty; 1926return System.Windows.Documents.TextElement.FontWeightProperty; 1928return System.Windows.Documents.TextElement.ForegroundProperty; 6202case KnownElements.TextElement: t = typeof(System.Windows.Documents.TextElement); break;
System\Windows\SystemResources.cs (4)
1274fe.CoerceValue(TextElement.FontFamilyProperty); 1275fe.CoerceValue(TextElement.FontSizeProperty); 1276fe.CoerceValue(TextElement.FontStyleProperty); 1277fe.CoerceValue(TextElement.FontWeightProperty);
System.Windows.Controls.Ribbon (4)
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (2)
848TextElement textElement; 863else if ((textElement = d as TextElement) != null)
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (2)
589ribbonGroup._headerContentPresenter.SetValue(TextElement.ForegroundProperty, e.NewValue); 593ribbonGroup._headerContentPresenter.ClearValue(TextElement.ForegroundProperty);