6 types derived from TextElement
PresentationFramework (6)
src\Framework\System\Windows\Documents\Block.cs (1)
26public abstract class Block : TextElement
src\Framework\System\Windows\Documents\Inline.cs (1)
22public abstract class Inline : TextElement
src\Framework\System\Windows\Documents\ListItem.cs (1)
28public class ListItem : TextElement
src\Framework\System\Windows\Documents\TableCell.cs (1)
51public class TableCell : TextElement, IIndexedChild<TableRow>
src\Framework\System\Windows\Documents\TableRow.cs (1)
44public class TableRow : TextElement, IAddChild, IIndexedChild<TableRowGroup>, IAcceptInsertion
src\Framework\System\Windows\Documents\TableRowGroup.cs (1)
50public class TableRowGroup : TextElement, IAddChild, IIndexedChild<Table>, IAcceptInsertion
556 references to TextElement
PresentationFramework (556)
src\Framework\MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (2)
519TextElement textElement = startNode as TextElement;
src\Framework\MS\Internal\Documents\ContentElementCollection.cs (1)
31where TParent : TextElement, IAcceptInsertion
src\Framework\MS\Internal\Documents\ContentHostHelper.cs (4)
51if (contentElement is TextElement) 53textContainer = ((TextElement)contentElement).TextContainer; 61ich = GetICHFromFlowDocument((TextElement)contentElement, (FlowDocument)parent); 90private static IContentHost GetICHFromFlowDocument(TextElement contentElement, FlowDocument flowDocument)
src\Framework\MS\Internal\Documents\DocumentViewerHelper.cs (4)
416e.TargetElement is TextElement) 418contextMenuPosition = ((TextElement)e.TargetElement).ContentStart; 427else if (e.TargetElement is TextElement) 429contextMenuPosition = ((TextElement)e.TargetElement).ContentStart;
src\Framework\MS\Internal\Documents\IIndexedChild.cs (2)
14/// Classes comprising structure of <see cref="Table"/> are <see cref="TextElement"/> derived 31where TParent : TextElement
src\Framework\MS\Internal\Documents\TableTextElementCollectionInternal.cs (2)
18where TParent : TextElement, IAcceptInsertion 19where TElementType : TextElement, IIndexedChild<TParent>
src\Framework\MS\Internal\Documents\TextContainerHelper.cs (18)
406while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 449while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 465while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 510internal static TextContentRange GetTextContentRangeForTextElement(TextElement textElement) 521internal static TextContentRange GetTextContentRangeForTextElementEdge(TextElement textElement, ElementEdge edge) 549if (element is TextElement) 551textPointer = ((TextElement)element).ContentStart; 571if (element is TextElement) 573length = ((TextElement)element).SymbolCount; 612TextElement uiContainer = embeddedObject.Parent as TextElement; 634TextElement textElement; 636textElement = element as TextElement; 688TextElement textElement; 690textElement = element as TextElement; 715if (fe.Parent is TextElement) 717TextElement uiContainer = (TextElement)fe.Parent;
src\Framework\MS\Internal\Documents\TextDocumentView.cs (6)
809position = ((TextElement)rowResult.Element).ElementEnd; 825position = ((TextElement)paragraph.Element).ContentStart; 3488TextElement textElement = paragraphResult.Element as TextElement; 3518TextElement textElement = paragraphResult.Element as TextElement;
src\Framework\MS\Internal\PtsHost\BaseParagraph.cs (1)
305if (this is TextParagraph && Element is TextElement)
src\Framework\MS\Internal\PtsHost\ContainerParaClient.cs (3)
228Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 316TextElement elementOwner = this.Paragraph.Element as TextElement;
src\Framework\MS\Internal\PtsHost\ContainerParagraph.cs (3)
1066if(!(Element is TextElement) || ((TextElement)Element).ContentStart != textPointer) 1091TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
src\Framework\MS\Internal\PtsHost\FigureParaClient.cs (3)
416Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 598Paragraph.Element as TextElement, ElementEdge.BeforeStart)); 606Paragraph.Element as TextElement, ElementEdge.AfterEnd));
src\Framework\MS\Internal\PtsHost\FloaterBaseParagraph.cs (1)
43protected FloaterBaseParagraph(TextElement element, StructuralCache structuralCache)
src\Framework\MS\Internal\PtsHost\FloaterParaClient.cs (3)
420Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 603Paragraph.Element as TextElement, ElementEdge.BeforeStart)); 611Paragraph.Element as TextElement, ElementEdge.AfterEnd));
src\Framework\MS\Internal\PtsHost\FloaterParagraph.cs (1)
45internal FloaterParagraph(TextElement element, StructuralCache structuralCache)
src\Framework\MS\Internal\PtsHost\FlowDocumentPage.cs (5)
333if (child is TextElement) 335TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 962if (e is TextElement) 964if ((e as TextElement).TextContainer == _structuralCache.TextContainer) 967elementPosition = new TextPointer((e as TextElement).ElementStart);
src\Framework\MS\Internal\PtsHost\LineBase.cs (4)
150TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 272TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
src\Framework\MS\Internal\PtsHost\ListParaClient.cs (1)
72Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty);
src\Framework\MS\Internal\PtsHost\ListParagraph.cs (1)
87TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
src\Framework\MS\Internal\PtsHost\MbpInfo.cs (2)
33MbpInfo mbp = new MbpInfo((TextElement)o); 102private MbpInfo(TextElement block)
src\Framework\MS\Internal\PtsHost\SubpageParaClient.cs (3)
341Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 572TextElement elementOwner = this.Paragraph.Element as TextElement;
src\Framework\MS\Internal\PtsHost\TableParaClient.cs (6)
247Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 565TextElement elementOwner = this.Paragraph.Element as TextElement; 1967rowGroupBackgroundBrush = (Brush)tableRowGroup.GetValue(TextElement.BackgroundProperty); 1986rowGroupBackgroundBrush = (Brush)tableRowGroup.GetValue(TextElement.BackgroundProperty); 2019Brush rowBackgroundBrush = (Brush)row.GetValue(TextElement.BackgroundProperty);
src\Framework\MS\Internal\PtsHost\TextParaClient.cs (2)
2098endOfParaGlyphWidth = ((double)TextParagraph.Element.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier); 2213endOfParaGlyphWidth = ((double)TextParagraph.Element.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier);
src\Framework\MS\Internal\PtsHost\TextParagraph.cs (8)
897TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 912private List<TextElement> GetAttachedObjectElements(int dcpFirst, int dcpLast) 914List<TextElement> attachedElements = new List<TextElement>(); 927TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 954List<TextElement> textElements = GetAttachedObjectElements(dcpFirst, dcpLast); 971List<TextElement> textElements = GetAttachedObjectElements(dcpFirst, dcpLast); 975TextElement textElement = textElements[index];
src\Framework\MS\Internal\PtsHost\UIElementParaClient.cs (1)
144Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty);
src\Framework\MS\Internal\PtsHost\UIElementParagraph.cs (1)
40internal UIElementParagraph(TextElement element, StructuralCache structuralCache)
src\Framework\MS\Internal\Text\ComplexLine.cs (5)
311element = position.Parent as TextElement; 396TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 487TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
src\Framework\MS\Internal\Text\DynamicPropertyReader.cs (12)
49FontFamily fontFamily = (FontFamily) element.GetValue(TextElement.FontFamilyProperty); 50FontStyle fontStyle = (FontStyle) element.GetValue(TextElement.FontStyleProperty); 51FontWeight fontWeight = (FontWeight) element.GetValue(TextElement.FontWeightProperty); 52FontStretch fontStretch = (FontStretch) element.GetValue(TextElement.FontStretchProperty); 61FontStyle fontStyle = (FontStyle) element.GetValue(TextElement.FontStyleProperty); 62FontWeight fontWeight = (FontWeight) element.GetValue(TextElement.FontWeightProperty); 63FontStretch fontStretch = (FontStretch) element.GetValue(TextElement.FontStretchProperty); 127return GetCollectionValue(element, TextElement.TextEffectsProperty) as TextEffectCollection; 216FontFamily fontFamily = (FontFamily)d.GetValue(TextElement.FontFamilyProperty); 217double fontSize = (double)d.GetValue(TextElement.FontSizeProperty); 244backgroundBrush = (Brush)element.GetValue(TextElement.BackgroundProperty); 267backgroundBrush = (Brush)position.GetValue(TextElement.BackgroundProperty);
src\Framework\MS\Internal\Text\TextProperties.cs (7)
121_typographyProperties = TextElement.GetTypographyProperties(target); 209_fontSize = (double)target.GetValue(TextElement.FontSizeProperty); 210_foreground = (Brush) target.GetValue(TextElement.ForegroundProperty); 271return TextElement.GetTypographyProperties(element); 284return TextElement.GetTypographyProperties(element); 292TextElement te = element as TextElement;
src\Framework\System\Windows\Automation\Peers\TextElementAutomationPeer.cs (14)
32public TextElementAutomationPeer(TextElement owner) 45TextElement textElement = (TextElement)Owner; 60TextElement textElement = (TextElement)Owner; 113TextElement textElement = (TextElement)Owner; 167TextElement textElement = (TextElement)Owner; 187private Rect CalculateVisibleRect(ITextView textView, TextElement textElement, TextPointer startPointer, TextPointer endPointer) 228TextElement textElement = (TextElement)Owner; 239TextElement textElement = (TextElement)Owner;
src\Framework\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(
src\Framework\System\Windows\Controls\ComboBox.cs (2)
1610TextElement textElement; 1625else if ((textElement = d as TextElement) != null)
src\Framework\System\Windows\Controls\Control.cs (7)
145TextElement.ForegroundProperty.AddOwner( 169TextElement.FontFamilyProperty.AddOwner( 194TextElement.FontSizeProperty.AddOwner( 220= TextElement.FontStretchProperty.AddOwner(typeof(Control), 221new FrameworkPropertyMetadata(TextElement.FontStretchProperty.DefaultMetadata.DefaultValue, 243TextElement.FontStyleProperty.AddOwner( 267TextElement.FontWeightProperty.AddOwner(
src\Framework\System\Windows\Controls\DataGridTextColumn.cs (15)
116DataGridHelper.SyncColumnProperty(this, e, TextElement.FontFamilyProperty, FontFamilyProperty); 117DataGridHelper.SyncColumnProperty(this, e, TextElement.FontSizeProperty, FontSizeProperty); 118DataGridHelper.SyncColumnProperty(this, e, TextElement.FontStyleProperty, FontStyleProperty); 119DataGridHelper.SyncColumnProperty(this, e, TextElement.FontWeightProperty, FontWeightProperty); 120DataGridHelper.SyncColumnProperty(this, e, TextElement.ForegroundProperty, ForegroundProperty); 136DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontFamilyProperty, FontFamilyProperty); 139DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontSizeProperty, FontSizeProperty); 142DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontStyleProperty, FontStyleProperty); 145DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontWeightProperty, FontWeightProperty); 148DataGridHelper.SyncColumnProperty(this, textElement, TextElement.ForegroundProperty, ForegroundProperty); 301TextElement.FontFamilyProperty.AddOwner( 322TextElement.FontSizeProperty.AddOwner( 345TextElement.FontStyleProperty.AddOwner( 366TextElement.FontWeightProperty.AddOwner( 387TextElement.ForegroundProperty.AddOwner(
src\Framework\System\Windows\Controls\Page.cs (3)
460TextElement.ForegroundProperty.AddOwner(typeof(Page)); 479TextElement.FontFamilyProperty.AddOwner(typeof(Page)); 501TextElement.FontSizeProperty.AddOwner(typeof(Page));
src\Framework\System\Windows\Controls\TextAdaptor.cs (5)
584if (childElement is TextElement) 586rangeStart = ((TextElement)childElement).ElementStart; 587rangeEnd = ((TextElement)childElement).ElementEnd; 594rangeStart = ((TextElement)parent).ContentStart; 595rangeEnd = ((TextElement)parent).ContentEnd;
src\Framework\System\Windows\Controls\TextBlock.cs (17)
657TextElement.FontFamilyProperty.AddOwner(typeof(TextBlock)); 703TextElement.FontStyleProperty.AddOwner(typeof(TextBlock)); 748TextElement.FontWeightProperty.AddOwner(typeof(TextBlock)); 793TextElement.FontStretchProperty.AddOwner(typeof(TextBlock)); 838TextElement.FontSizeProperty.AddOwner( 887TextElement.ForegroundProperty.AddOwner( 933TextElement.BackgroundProperty.AddOwner( 973TextElement.TextEffectsProperty.AddOwner( 1859if (child is TextElement) 1861end = new TextPointer(((TextElement)child).ElementEnd); 3497else if (element is TextElement) 3499if (textBlock._complexContent.TextContainer != ((TextElement)element).TextContainer) 3643if (e is TextElement) 3645if ((e as TextElement).TextContainer == _complexContent.TextContainer) 3648position = new TextPointer((e as TextElement).ElementStart); 3708TextElement te = TextElement.ContainerTextElementField.GetValue(d);
src\Framework\System\Windows\Controls\TextBox.cs (1)
1872double fontSize = (double)this.GetValue(TextElement.FontSizeProperty);
src\Framework\System\Windows\Controls\TextRangeAdaptor.cs (7)
60TextEffectCollection effects = tp.GetValue(TextElement.TextEffectsProperty) as TextEffectCollection; 71return ColorFromBrush(tp.GetValue(TextElement.BackgroundProperty)); 171return GetFontFamilyName((FontFamily)tp.GetValue(TextElement.FontFamilyProperty), tp); 181return NativeObjectLengthToPoints((double)tp.GetValue(TextElement.FontSizeProperty)); 191FontWeight fontWeight = (FontWeight)tp.GetValue(TextElement.FontWeightProperty); 202return ColorFromBrush(tp.GetValue(TextElement.ForegroundProperty)); 279FontStyle style = (FontStyle)tp.GetValue(TextElement.FontStyleProperty);
src\Framework\System\Windows\Documents\FixedElement.cs (6)
73TextElement.FontFamilyProperty.AddOwner( 77TextElement.FontStyleProperty.AddOwner( 81TextElement.FontWeightProperty.AddOwner( 85TextElement.FontStretchProperty.AddOwner( 89TextElement.FontSizeProperty.AddOwner( 93TextElement.ForegroundProperty.AddOwner(
src\Framework\System\Windows\Documents\FixedSOMTextRun.cs (6)
240element.SetValue(TextElement.FontSizeProperty, _fontSize); 241element.SetValue(TextElement.FontWeightProperty, _fontWeight); 242element.SetValue(TextElement.FontStretchProperty, _fontStretch); 243element.SetValue(TextElement.FontStyleProperty, _fontStyle); 255element.SetValue(TextElement.FontFamilyProperty, new FontFamily(_fontFamily)); 257element.SetValue(TextElement.ForegroundProperty, _foreground);
src\Framework\System\Windows\Documents\FlowDocument.cs (13)
208TextElement.FontFamilyProperty.AddOwner(_typeofThis); 227TextElement.FontStyleProperty.AddOwner(_typeofThis); 242TextElement.FontWeightProperty.AddOwner(_typeofThis); 257TextElement.FontStretchProperty.AddOwner(_typeofThis); 272TextElement.FontSizeProperty.AddOwner( 290TextElement.ForegroundProperty.AddOwner( 306TextElement.BackgroundProperty.AddOwner( 325TextElement.TextEffectsProperty.AddOwner( 902else if (element is TextElement) 904textPointer = ((TextElement)element).ContentStart; 1108_typographyPropertiesGroup = TextElement.GetTypographyProperties(this); 1658if (value is TextElement && ((TextElement)value).Parent != null)
src\Framework\System\Windows\Documents\InlineCollection.cs (2)
162if (this.Parent is TextElement) 164TextSchema.ValidateChild((TextElement)this.Parent, child, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
src\Framework\System\Windows\Documents\List.cs (1)
220textNav.MoveToPosition(((TextElement)element).ElementEnd);
src\Framework\System\Windows\Documents\RangeContentEnumerator.cs (1)
208_navigator.MoveToPosition(((TextElement)_navigator.Parent).ElementEnd);
src\Framework\System\Windows\Documents\Span.cs (4)
140TextElement commonAncestor = TextElement.GetCommonAncestor((TextElement)start.Parent, (TextElement)end.Parent);
src\Framework\System\Windows\Documents\TextContainer.cs (17)
222TextElement textElement; 242textElement = position.Parent as TextElement; 269TextElement textElement; 292textElement = position.Parent as TextElement; 942TextElement textElement = position.Parent as TextElement; 952internal void InsertElementInternal(TextPointer startPosition, TextPointer endPosition, TextElement element) 1594internal void ExtractElementInternal(TextElement element) 2115TextElement textElement = logicalTreeNode as TextElement; 2419TextElement textElement = startPosition.Parent as TextElement; 2783private char[] ExtractElementInternal(TextElement element, bool deep, out ExtractChangeEventArgs extractChangeEventArgs) 3272TextElement element; 3281element = position.Parent as TextElement; 3438TextElement adjacentElement = startPosition.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
src\Framework\System\windows\Documents\TextEditorCharacters.cs (14)
192object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontWeightProperty); 195TextEditorCharacters._OnApplyProperty(This, TextElement.FontWeightProperty, fontWeight); 212object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontStyleProperty); 215TextEditorCharacters._OnApplyProperty(This, TextElement.FontStyleProperty, fontStyle); 314double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 329TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize); 335TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.IncreaseByAbsoluteValue); 356double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 370TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize); 376TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.DecreaseByAbsoluteValue); 390TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, args.Parameter); 403TextEditorCharacters._OnApplyProperty(This, TextElement.FontFamilyProperty, args.Parameter); 416TextEditorCharacters._OnApplyProperty(This, TextElement.ForegroundProperty, args.Parameter); 429TextEditorCharacters._OnApplyProperty(This, TextElement.BackgroundProperty, args.Parameter);
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (4)
82else if ((This.Selection.IsEmpty || e.TargetElement is TextElement) && 95TextElement element = start.Parent as TextElement; 105element = element.Parent as TextElement;
src\Framework\System\windows\Documents\TextEditorCopyPaste.cs (6)
890if ((element is Section || element is Span) && PasteTextElement(This, (TextElement)element)) 966TextElement textElement = WpfPayload.LoadElement(memoryStream) as TextElement; 1061private static bool PasteTextElement(TextEditor This, TextElement sectionOrSpan) 1104TextElement flowContent = xamlObject as TextElement;
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (1)
442object fontStylePropertyValue = dragPosition.GetValue(TextElement.FontStyleProperty);
src\Framework\System\windows\Documents\TextEditorSelection.cs (1)
2266double breakWidth = (double)innerMovingPosition.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier;
src\Framework\System\windows\Documents\TextEditorTyping.cs (5)
1470TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1473parent = parent.Parent as TextElement; 1930pointer.Parent is TextElement && 1931TextSchema.HasHyperlinkAncestor((TextElement)pointer.Parent))
src\Framework\System\Windows\Documents\TextEffectResolver.cs (1)
182_element.SetValue(TextElement.TextEffectsProperty, textEffects);
src\Framework\System\Windows\Documents\TextElement.cs (33)
56typographyProperties[i].OverrideMetadata(typeof(TextElement), new FrameworkPropertyMetadata(typographyChanged)); 295internal static readonly UncommonField<TextElement> ContainerTextElementField = new UncommonField<TextElement>(); 468typeof(TextElement), 524typeof(TextElement), 575typeof(TextElement), 626typeof(TextElement), 677typeof(TextElement), 732typeof(TextElement), 784typeof(TextElement), 805typeof(TextElement), 848TextElement te = value as TextElement; 1156TextElement child = children.Current as TextElement; 1171internal static TextElement GetCommonAncestor(TextElement element1, TextElement element2) 1177TextElement element; 1180for (element = element1; element.Parent is TextElement; element = (TextElement)element.Parent) 1184for (element = element2; element.Parent is TextElement; element = (TextElement)element.Parent) 1193element1 = (TextElement)element1.Parent; 1199element2 = (TextElement)element2.Parent; 1206element1 = element1.Parent as TextElement; 1207element2 = element2.Parent as TextElement; 1384((TextElement) element)._typographyPropertiesGroup = null; 1464internal TextElement NextElement 1482internal TextElement PreviousElement 1500internal TextElement FirstChildElement 1518internal TextElement LastChildElement 1584private void Append(TextElement element)
src\Framework\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); 161TextElement element; 715return _isOwnerParent ? _owner : ((TextElement)_owner).Parent; 736textContainer = ((TextElement)_owner).TextContainer; 751if (this.Parent is TextElement) 753firstChild = (TextElementType)((TextElement)this.Parent).FirstChildElement; 774if (this.Parent is TextElement) 776lastChild = (TextElementType)((TextElement)this.Parent).LastChildElement; 997this.Parent is TextElement ? ((TextElement)this.Parent).ContentStart : this.TextContainer.Start; 1008this.Parent is TextElement ? ((TextElement)this.Parent).ContentEnd : this.TextContainer.End;
src\Framework\System\Windows\Documents\TextElementEnumerator.cs (1)
28internal class TextElementEnumerator<TextElementType> : IEnumerator<TextElementType> where TextElementType : TextElement
src\Framework\System\Windows\Documents\TextPointer.cs (26)
30/// <para>b) Get a <see cref="TextElement"/> scoping or adjacent a position of this TextPointer;</para> 51/// for opening and closing tags of <see cref="TextElement"/> elements, <c>EmbeddedElement</c> 66/// <see cref="TextElement.ElementStart"/> and <see cref="TextElement.ElementEnd"/>, 67/// <see cref="TextElement.ContentStart"/> and <see cref="TextElement.ContentEnd"/>, etc. 648/// muchy attention to a difference between the <see cref="TextElement"/> 811/// <para>The returned element may be both a <see cref="TextElement"/> 813/// <para><see cref="TextElement"/> object will be returned when 847/// <para>- opening or closing tag of a <see cref="TextElement"/>.</para> 909/// <para>- opening or closing tag of a <see cref="TextElement"/>.</para> 1400internal void InsertTextElement(TextElement textElement) 1754TextElement ancestor = this.Parent as TextElement; 1758ancestor = ancestor.Parent as TextElement; 2171if (!((TextElement)this.Parent).IsEmpty) // the parent may be InlineUIContainer or BlockUIContainer 2188internal TextElement GetAdjacentElementFromOuterPosition(LogicalDirection direction) 2550TextElement element; 2561element = this.Parent as TextElement; 2578element = this.Parent as TextElement; 3608TextElement element1 = position1.Parent as TextElement; 3609TextElement element2 = position2.Parent as TextElement; 3623commonAncestor = TextElement.GetCommonAncestor(element1, element2); 4148private TextElement GetElement(LogicalDirection direction)
src\Framework\System\Windows\Documents\TextPointerBase.cs (2)
167internal static bool IsAtPotentialRunPosition(TextElement run) 305return IsInAncestorScope(position, typeof(TextElement), typeof(AnchoredBlock));
src\Framework\System\Windows\Documents\TextRange.cs (3)
1083internal virtual void SetXmlVirtual(TextElement fragment) 1373TextElement fragment = xamlObject as TextElement;
src\Framework\System\Windows\Documents\TextRangeBase.cs (19)
457DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 462element = element is TextElement ? ((TextElement)element).Parent : null; 1606thisRange.SetXmlVirtual((TextElement)element); 1618TextElement textElement = WpfPayload.LoadElement(memoryStream) as TextElement; 1855TextElement outerAnchoredBlock = start.Parent as TextElement; 1861outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1868TextElement innerElement = end.Parent as TextElement; 1875innerElement = innerElement.Parent as TextElement; 1892outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1897outerAnchoredBlock = end.Parent as TextElement; 1903outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1910TextElement innerElement = start.Parent as TextElement; 1917innerElement = innerElement.Parent as TextElement; 1934outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement;
src\Framework\System\Windows\Documents\TextRangeEdit.cs (23)
33internal static TextElement InsertElementClone(TextPointer start, TextPointer end, TextElement element) 35TextElement newElement = (TextElement)Activator.CreateInstance(element.GetType()); 424TextElement parent = (TextElement)start.Parent; 528TextElement element = (TextElement)position.Parent; 535TextElement newElement; 1208private static void SetPropertyValue(TextElement element, DependencyProperty property, object currentValue, object newValue) 1292TextElement commonAncestor = position.Parent as TextElement; 1447TextElement parent = (TextElement)startPosition.Parent; 1719private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, TextElement limitingAncestor) 1750private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, bool preserveStructuralFormatting, TextElement limitingAncestor) 1888Invariant.Assert(formattingProperty == TextElement.FontSizeProperty, "Only FontSize can be incremented/decremented among character properties"); 1967ApplyStructuralInlinePropertyAcrossInline(start, end, (TextElement)commonAncestor, formattingProperty, value); 2053TextElement limit = (TextElement)conflictingParent.Parent; 2150start = SplitFormattingElements(start, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement); 2151end = SplitFormattingElements(end, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement); 2161private static void ApplyStructuralInlinePropertyAcrossInline(TextPointer start, TextPointer end, TextElement commonAncestor, DependencyProperty formattingProperty, object value)
src\Framework\System\Windows\Documents\TextRangeEditLists.cs (7)
82TextElement parentBlock = (TextElement)secondParagraphOrBlockUIContainer.Parent; 104TextElement previousBlock = secondParagraphOrBlockUIContainer.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as TextElement; 472TextElement parent = (TextElement)lastListItem.Parent; 477parent = (TextElement)parent.Parent;
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (19)
115TextElement element = position.Parent as TextElement; 118element = element.Parent as TextElement; 127TextElement element = position.Parent as TextElement; 130element = element.Parent as TextElement; 139TextElement element = position.Parent as TextElement; 142element = element.Parent as TextElement; 636TextElement ancestor = insertionPosition.Parent as TextElement; 647ancestor = ancestor.Parent as TextElement; 2153TextElement commonAncestor = anchorPosition.Parent as TextElement; 2156commonAncestor = commonAncestor.Parent as TextElement; 2170TextElement commonAncestor, 2182TextElement element = position.Parent as TextElement; 2214element = element.Parent as TextElement;
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (19)
145internal static void PasteXml(TextRange range, TextElement fragment) 230TextElement nextElement = (TextElement)textReader.GetAdjacentElement(LogicalDirection.Forward); 368Invariant.Assert(typeof(TextElement).IsAssignableFrom(pointer.ParentType), "pointer must be still in a scope of TextElement"); 437Invariant.Assert(typeof(TextElement).IsAssignableFrom(thisElement.ParentType), "thisElement is expected to be a TextElement"); 873if (property == Inline.BaselineAlignmentProperty || property == TextElement.TextEffectsProperty) 1252private static bool PasteSingleEmbeddedElement(TextRange range, TextElement fragment) 1256TextElement uiContainer = fragment.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 1285private static void PasteTextFragment(TextElement fragment, TextRange range) 1307private static void PasteNonMergeableTextFragment(TextElement fragment, TextRange range) 1324private static void PasteMergeableTextFragment(TextElement fragment, TextRange range, TextPointer insertionPosition) 1560private static void AdjustFragmentForTargetRange(TextElement fragment, TextRange range) 1581private static void ApplyContextualProperties(TextPointer start, TextPointer end, TextElement propertyBag) 1639TextElement element = (TextElement)start.Parent; 1703while (typeof(TextElement).IsAssignableFrom(runningEnd.ParentType) && !runningEnd.HasEqualScope(commonAncestor)) 1722if (typeof(TextElement).IsAssignableFrom(commonAncestor.ParentType)) 1762while (typeof(TextElement).IsAssignableFrom(navigator.ParentType))
src\Framework\System\Windows\Documents\TextSchema.cs (37)
50TextElement.FontFamilyProperty, 51TextElement.FontStyleProperty, 52TextElement.FontWeightProperty, 53TextElement.FontStretchProperty, 54TextElement.FontSizeProperty, 55TextElement.ForegroundProperty, 104internal static bool ValidateChild(TextElement parent, TextElement child, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 123internal static bool IsValidChild(TextElement parent, Type childType) 128internal static bool ValidateChild(TextElement parent, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 165TextElement leftElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward); 166TextElement rightElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 171if (parent is TextElement) 173return ValidateChild((TextElement)parent, childType, throwIfIllegalChild, throwIfIllegalHyperlinkDescendent); 222if (typeof(TextElement).IsAssignableFrom(position.ParentType) && 237Invariant.Assert(!typeof(TextElement).IsAssignableFrom(parentType)); 242internal static bool HasHyperlinkAncestor(TextElement element) 273return elementType.Module == typeof(System.Windows.Documents.TextElement).Module || // presentationframework 469Invariant.Assert(typeof(TextElement).IsAssignableFrom(type) || typeof(TableColumn).IsAssignableFrom(type), 889private static bool HasIllegalHyperlinkDescendant(TextElement element, bool throwIfIllegalDescendent) 899TextElement nextElement = (TextElement)start.GetAdjacentElement(LogicalDirection.Forward); 927string string1 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush1); 928string string2 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush2); 967TextElement.BackgroundProperty, 981TextElement.BackgroundProperty, 1002TextElement.BackgroundProperty, 1020TextElement.BackgroundProperty, 1034TextElement.BackgroundProperty, 1050TextElement.BackgroundProperty, 1065TextElement.BackgroundProperty, 1073TextElement.BackgroundProperty, 1089TextElement.BackgroundProperty, 1106TextElement.BackgroundProperty, 1129TextElement.BackgroundProperty, 1146TextElement.BackgroundProperty, 1153TextElement.BackgroundProperty,
src\Framework\System\windows\Documents\TextSelection.cs (8)
1344internal override void SetXmlVirtual(TextElement fragment) 1509noninheritableProperties[i] != TextElement.TextEffectsProperty && 1517element = ((TextElement)element).Parent; 1651backgroundPropertyValue = ((TextSelection)focusedTextSelection).GetCurrentValue(TextElement.BackgroundProperty); 2055fontStylePropertyValue = ((TextSelection)textSelection).GetCurrentValue(TextElement.FontStyleProperty); 2145object fontStylePropertyValue = GetPropertyValue(TextElement.FontStyleProperty); 2242double fontSize = (double)currentTextSelection.GetPropertyValue(TextElement.FontSizeProperty); 2243FontFamily fontFamily = (FontFamily)currentTextSelection.GetPropertyValue(TextElement.FontFamilyProperty);
src\Framework\System\Windows\Documents\TextServicesDisplayAttribute.cs (1)
115return ((SolidColorBrush)position.GetValue(TextElement.ForegroundProperty)).Color;
src\Framework\System\Windows\Documents\TextStore.cs (14)
333TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward); 722(double)UiScope.GetValue(TextElement.FontSizeProperty), 723(FontFamily)UiScope.GetValue(TextElement.FontFamilyProperty), 742(double)position.GetValue(TextElement.FontSizeProperty), 743(FontFamily)position.GetValue(TextElement.FontFamilyProperty), 1138TextElement startElement = (TextElement)((TextPointer)start).Parent; 1139TextElement endElement = (TextElement)((TextPointer)end).Parent; 1140TextElement commonAncestor = TextElement.GetCommonAncestor(startElement, endElement); 3397TextElement element = start.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
src\Framework\System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
444TextElement element; 447element = (TextElement)Activator.CreateInstance(_elementType);
src\Framework\System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
61TextElement element; 69element = (TextElement)Activator.CreateInstance(_type);
src\Framework\System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (1)
54TextElement element;
src\Framework\System\Windows\Documents\TextTreeTextElementNode.cs (2)
313internal TextElement TextElement 391private TextElement _textElement;
src\Framework\System\Windows\Documents\TextTreeUndo.cs (1)
59internal static void CreatePropertyUndoUnit(TextElement element, DependencyPropertyChangedEventArgs e)
src\Framework\System\Windows\Documents\ValidationHelper.cs (2)
122if (child is TextElement) 124if (((TextElement)child).Parent != null)
src\Framework\System\Windows\FrameworkElement.cs (12)
2410TextElement.FontFamilyProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontFamily, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontFamily))); 2411TextElement.FontSizeProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontSize, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontSize))); 2412TextElement.FontStyleProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontStyle, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontStyle))); 2413TextElement.FontWeightProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontWeight, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontWeight))); 5552if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontFamilyProperty)) 5563if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontSizeProperty)) 5574if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontStyleProperty)) 5585if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontWeightProperty)) 5618CoerceValue(TextElement.FontFamilyProperty); 5619CoerceValue(TextElement.FontSizeProperty); 5620CoerceValue(TextElement.FontStyleProperty); 5621CoerceValue(TextElement.FontWeightProperty);
src\Framework\System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
740case 648: t = () => typeof(TextElement); break;
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (21)
3630Type type = typeof(System.Windows.Documents.TextElement); 3631DependencyProperty dp = System.Windows.Documents.TextElement.BackgroundProperty; 3633this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3647Type type = typeof(System.Windows.Documents.TextElement); 3648DependencyProperty dp = System.Windows.Documents.TextElement.FontFamilyProperty; 3650this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3664Type type = typeof(System.Windows.Documents.TextElement); 3665DependencyProperty dp = System.Windows.Documents.TextElement.FontSizeProperty; 3667this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3681Type type = typeof(System.Windows.Documents.TextElement); 3682DependencyProperty dp = System.Windows.Documents.TextElement.FontStretchProperty; 3684this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3698Type type = typeof(System.Windows.Documents.TextElement); 3699DependencyProperty dp = System.Windows.Documents.TextElement.FontStyleProperty; 3701this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3715Type type = typeof(System.Windows.Documents.TextElement); 3716DependencyProperty dp = System.Windows.Documents.TextElement.FontWeightProperty; 3718this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3732Type type = typeof(System.Windows.Documents.TextElement); 3733DependencyProperty dp = System.Windows.Documents.TextElement.ForegroundProperty; 3735this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
10060typeof(System.Windows.Documents.TextElement),
src\Framework\System\Windows\Markup\KnownTypes.cs (8)
1913return System.Windows.Documents.TextElement.BackgroundProperty; 1915return System.Windows.Documents.TextElement.FontFamilyProperty; 1917return System.Windows.Documents.TextElement.FontSizeProperty; 1919return System.Windows.Documents.TextElement.FontStretchProperty; 1921return System.Windows.Documents.TextElement.FontStyleProperty; 1923return System.Windows.Documents.TextElement.FontWeightProperty; 1925return System.Windows.Documents.TextElement.ForegroundProperty; 6192case KnownElements.TextElement: t = typeof(System.Windows.Documents.TextElement); break;
src\Framework\System\Windows\SystemResources.cs (4)
1333fe.CoerceValue(TextElement.FontFamilyProperty); 1334fe.CoerceValue(TextElement.FontSizeProperty); 1335fe.CoerceValue(TextElement.FontStyleProperty); 1336fe.CoerceValue(TextElement.FontWeightProperty);