6 types derived from TextElement
PresentationFramework (6)
System\Windows\Documents\Block.cs (1)
23public abstract class Block : TextElement
System\Windows\Documents\Inline.cs (1)
16public abstract class Inline : TextElement
System\Windows\Documents\ListItem.cs (1)
22public class ListItem : TextElement
System\Windows\Documents\TableCell.cs (1)
33public class TableCell : TextElement, IIndexedChild<TableRow>
System\Windows\Documents\TableRow.cs (1)
22public class TableRow : TextElement, IAddChild, IIndexedChild<TableRowGroup>, IAcceptInsertion
System\Windows\Documents\TableRowGroup.cs (1)
15public class TableRowGroup : TextElement, IAddChild, IIndexedChild<Table>, IAcceptInsertion
567 references to TextElement
Microsoft.CodeAnalysis.EditorFeatures.Wpf (6)
DependencyObjectExtensions.cs (6)
16dependencyObject.SetValue(TextElement.FontFamilyProperty, textProperties.Typeface.FontFamily); 17dependencyObject.SetValue(TextElement.FontSizeProperty, textProperties.FontRenderingEmSize); 18dependencyObject.SetValue(TextElement.FontStyleProperty, textProperties.Italic ? FontStyles.Italic : FontStyles.Normal); 19dependencyObject.SetValue(TextElement.FontWeightProperty, textProperties.Bold ? FontWeights.Bold : FontWeights.Normal); 20dependencyObject.SetValue(TextElement.BackgroundProperty, textProperties.BackgroundBrush); 21dependencyObject.SetValue(TextElement.ForegroundProperty, textProperties.ForegroundBrush);
Microsoft.VisualStudio.LanguageServices (3)
FindReferences\Entries\DocumentSpanEntry.cs (1)
136System.Windows.Documents.TextElement.BackgroundProperty,
FindReferences\RoslynDefinitionBucket.cs (1)
120inline.SetValue(TextElement.FontWeightProperty, FontWeights.Bold);
ValueTracking\TreeItemViewModel.cs (1)
132TextElement.BackgroundProperty,
PresentationFramework (554)
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (2)
494TextElement textElement = startNode as TextElement;
MS\Internal\Documents\ContentElementCollection.cs (1)
22where TParent : TextElement, IAcceptInsertion
MS\Internal\Documents\ContentHostHelper.cs (4)
45if (contentElement is TextElement) 47textContainer = ((TextElement)contentElement).TextContainer; 55ich = GetICHFromFlowDocument((TextElement)contentElement, (FlowDocument)parent); 84private static IContentHost GetICHFromFlowDocument(TextElement contentElement, FlowDocument flowDocument)
MS\Internal\Documents\DocumentViewerHelper.cs (4)
393e.TargetElement is TextElement) 395contextMenuPosition = ((TextElement)e.TargetElement).ContentStart; 404else if (e.TargetElement is TextElement) 406contextMenuPosition = ((TextElement)e.TargetElement).ContentStart;
MS\Internal\Documents\IIndexedChild.cs (2)
10/// Classes comprising structure of <see cref="Table"/> are <see cref="TextElement"/> derived 27where TParent : TextElement
MS\Internal\Documents\TableTextElementCollectionInternal.cs (2)
17where TParent : TextElement, IAcceptInsertion 18where TElementType : TextElement, IIndexedChild<TParent>
MS\Internal\Documents\TextContainerHelper.cs (16)
397while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 440while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 456while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 501internal static TextContentRange GetTextContentRangeForTextElement(TextElement textElement) 512internal static TextContentRange GetTextContentRangeForTextElementEdge(TextElement textElement, ElementEdge edge) 540if (element is TextElement) 542textPointer = ((TextElement)element).ContentStart; 562if (element is TextElement) 564length = ((TextElement)element).SymbolCount; 603TextElement uiContainer = embeddedObject.Parent as TextElement; 625TextElement textElement; 627textElement = element as TextElement; 679TextElement textElement; 681textElement = element as TextElement; 705if (fe.Parent is TextElement uiContainer)
MS\Internal\Documents\TextDocumentView.cs (6)
797position = ((TextElement)rowResult.Element).ElementEnd; 813position = ((TextElement)paragraph.Element).ContentStart; 3432TextElement textElement = paragraphResult.Element as TextElement; 3462TextElement textElement = paragraphResult.Element as TextElement;
MS\Internal\PtsHost\BaseParagraph.cs (1)
298if (this is TextParagraph && Element is TextElement)
MS\Internal\PtsHost\ContainerParaClient.cs (3)
189Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 262TextElement elementOwner = this.Paragraph.Element as TextElement;
MS\Internal\PtsHost\ContainerParagraph.cs (3)
1016if(!(Element is TextElement) || ((TextElement)Element).ContentStart != textPointer) 1041TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\FigureParaClient.cs (3)
356Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 530Paragraph.Element as TextElement, ElementEdge.BeforeStart)); 538Paragraph.Element as TextElement, ElementEdge.AfterEnd));
MS\Internal\PtsHost\FloaterBaseParagraph.cs (1)
29protected FloaterBaseParagraph(TextElement element, StructuralCache structuralCache)
MS\Internal\PtsHost\FloaterParaClient.cs (3)
363Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 538Paragraph.Element as TextElement, ElementEdge.BeforeStart)); 546Paragraph.Element as TextElement, ElementEdge.AfterEnd));
MS\Internal\PtsHost\FloaterParagraph.cs (1)
31internal FloaterParagraph(TextElement element, StructuralCache structuralCache)
MS\Internal\PtsHost\FlowDocumentPage.cs (5)
322if (child is TextElement) 324TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 925if (e is TextElement) 927if ((e as TextElement).TextContainer == _structuralCache.TextContainer) 930elementPosition = new TextPointer((e as TextElement).ElementStart);
MS\Internal\PtsHost\LineBase.cs (4)
134TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 256TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
MS\Internal\PtsHost\ListParaClient.cs (1)
57Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty);
MS\Internal\PtsHost\ListParagraph.cs (1)
70TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\MbpInfo.cs (2)
29MbpInfo mbp = new MbpInfo((TextElement)o); 98private MbpInfo(TextElement block)
MS\Internal\PtsHost\SubpageParaClient.cs (3)
292Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 508TextElement elementOwner = this.Paragraph.Element as TextElement;
MS\Internal\PtsHost\TableParaClient.cs (6)
220Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 515TextElement elementOwner = this.Paragraph.Element as TextElement; 1844rowGroupBackgroundBrush = (Brush)tableRowGroup.GetValue(TextElement.BackgroundProperty); 1863rowGroupBackgroundBrush = (Brush)tableRowGroup.GetValue(TextElement.BackgroundProperty); 1891Brush rowBackgroundBrush = (Brush)row.GetValue(TextElement.BackgroundProperty);
MS\Internal\PtsHost\TextParaClient.cs (2)
1882endOfParaGlyphWidth = ((double)TextParagraph.Element.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier); 1992endOfParaGlyphWidth = ((double)TextParagraph.Element.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier);
MS\Internal\PtsHost\TextParagraph.cs (8)
866TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 881private List<TextElement> GetAttachedObjectElements(int dcpFirst, int dcpLast) 883List<TextElement> attachedElements = new List<TextElement>(); 896TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 922List<TextElement> textElements = GetAttachedObjectElements(dcpFirst, dcpLast); 939List<TextElement> textElements = GetAttachedObjectElements(dcpFirst, dcpLast); 943TextElement textElement = textElements[index];
MS\Internal\PtsHost\UIElementParaClient.cs (1)
132Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty);
MS\Internal\PtsHost\UIElementParagraph.cs (1)
30internal UIElementParagraph(TextElement element, StructuralCache structuralCache)
MS\Internal\Text\ComplexLine.cs (5)
301element = position.Parent as TextElement; 384TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 475TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
MS\Internal\Text\DynamicPropertyReader.cs (12)
39FontFamily fontFamily = (FontFamily) element.GetValue(TextElement.FontFamilyProperty); 40FontStyle fontStyle = (FontStyle) element.GetValue(TextElement.FontStyleProperty); 41FontWeight fontWeight = (FontWeight) element.GetValue(TextElement.FontWeightProperty); 42FontStretch fontStretch = (FontStretch) element.GetValue(TextElement.FontStretchProperty); 51FontStyle fontStyle = (FontStyle) element.GetValue(TextElement.FontStyleProperty); 52FontWeight fontWeight = (FontWeight) element.GetValue(TextElement.FontWeightProperty); 53FontStretch fontStretch = (FontStretch) element.GetValue(TextElement.FontStretchProperty); 117return GetCollectionValue(element, TextElement.TextEffectsProperty) as TextEffectCollection; 206FontFamily fontFamily = (FontFamily)d.GetValue(TextElement.FontFamilyProperty); 207double fontSize = (double)d.GetValue(TextElement.FontSizeProperty); 234backgroundBrush = (Brush)element.GetValue(TextElement.BackgroundProperty); 257backgroundBrush = (Brush)position.GetValue(TextElement.BackgroundProperty);
MS\Internal\Text\TextProperties.cs (7)
115_typographyProperties = TextElement.GetTypographyProperties(target); 203_fontSize = (double)target.GetValue(TextElement.FontSizeProperty); 204_foreground = (Brush) target.GetValue(TextElement.ForegroundProperty); 261return TextElement.GetTypographyProperties(element); 274return TextElement.GetTypographyProperties(element); 282TextElement te = element as TextElement;
System\Windows\Automation\Peers\TextElementAutomationPeer.cs (14)
25public TextElementAutomationPeer(TextElement owner) 38TextElement textElement = (TextElement)Owner; 47TextElement textElement = (TextElement)Owner; 94TextElement textElement = (TextElement)Owner; 148TextElement textElement = (TextElement)Owner; 168private Rect CalculateVisibleRect(ITextView textView, TextElement textElement, TextPointer startPointer, TextPointer endPointer) 209TextElement textElement = (TextElement)Owner; 220TextElement textElement = (TextElement)Owner;
System\Windows\Controls\AccessText.cs (8)
152TextElement.FontFamilyProperty.AddOwner(typeof(AccessText)); 171TextElement.FontStyleProperty.AddOwner(typeof(AccessText)); 186TextElement.FontWeightProperty.AddOwner(typeof(AccessText)); 201TextElement.FontStretchProperty.AddOwner(typeof(AccessText)); 216TextElement.FontSizeProperty.AddOwner(typeof(AccessText)); 233TextElement.ForegroundProperty.AddOwner(typeof(AccessText)); 248TextElement.BackgroundProperty.AddOwner( 288TextElement.TextEffectsProperty.AddOwner(
System\Windows\Controls\ComboBox.cs (2)
1594TextElement textElement; 1609else if ((textElement = d as TextElement) != null)
System\Windows\Controls\Control.cs (7)
134TextElement.ForegroundProperty.AddOwner( 158TextElement.FontFamilyProperty.AddOwner( 183TextElement.FontSizeProperty.AddOwner( 209= TextElement.FontStretchProperty.AddOwner(typeof(Control), 210new FrameworkPropertyMetadata(TextElement.FontStretchProperty.DefaultMetadata.DefaultValue, 232TextElement.FontStyleProperty.AddOwner( 256TextElement.FontWeightProperty.AddOwner(
System\Windows\Controls\DataGridTextColumn.cs (15)
111DataGridHelper.SyncColumnProperty(this, e, TextElement.FontFamilyProperty, FontFamilyProperty); 112DataGridHelper.SyncColumnProperty(this, e, TextElement.FontSizeProperty, FontSizeProperty); 113DataGridHelper.SyncColumnProperty(this, e, TextElement.FontStyleProperty, FontStyleProperty); 114DataGridHelper.SyncColumnProperty(this, e, TextElement.FontWeightProperty, FontWeightProperty); 115DataGridHelper.SyncColumnProperty(this, e, TextElement.ForegroundProperty, ForegroundProperty); 131DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontFamilyProperty, FontFamilyProperty); 134DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontSizeProperty, FontSizeProperty); 137DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontStyleProperty, FontStyleProperty); 140DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontWeightProperty, FontWeightProperty); 143DataGridHelper.SyncColumnProperty(this, textElement, TextElement.ForegroundProperty, ForegroundProperty); 296TextElement.FontFamilyProperty.AddOwner( 317TextElement.FontSizeProperty.AddOwner( 340TextElement.FontStyleProperty.AddOwner( 361TextElement.FontWeightProperty.AddOwner( 382TextElement.ForegroundProperty.AddOwner(
System\Windows\Controls\Page.cs (3)
431TextElement.ForegroundProperty.AddOwner(typeof(Page)); 450TextElement.FontFamilyProperty.AddOwner(typeof(Page)); 472TextElement.FontSizeProperty.AddOwner(typeof(Page));
System\Windows\Controls\TextAdaptor.cs (5)
590if (childElement is TextElement) 592rangeStart = ((TextElement)childElement).ElementStart; 593rangeEnd = ((TextElement)childElement).ElementEnd; 600rangeStart = ((TextElement)parent).ContentStart; 601rangeEnd = ((TextElement)parent).ContentEnd;
System\Windows\Controls\TextBlock.cs (17)
620TextElement.FontFamilyProperty.AddOwner(typeof(TextBlock)); 660TextElement.FontStyleProperty.AddOwner(typeof(TextBlock)); 699TextElement.FontWeightProperty.AddOwner(typeof(TextBlock)); 738TextElement.FontStretchProperty.AddOwner(typeof(TextBlock)); 777TextElement.FontSizeProperty.AddOwner( 820TextElement.ForegroundProperty.AddOwner( 860TextElement.BackgroundProperty.AddOwner( 900TextElement.TextEffectsProperty.AddOwner( 1752if (child is TextElement) 1754end = new TextPointer(((TextElement)child).ElementEnd); 3488else if (element is TextElement) 3490if (textBlock._complexContent.TextContainer != ((TextElement)element).TextContainer) 3634if (e is TextElement) 3636if ((e as TextElement).TextContainer == _complexContent.TextContainer) 3639position = new TextPointer((e as TextElement).ElementStart); 3699TextElement te = TextElement.ContainerTextElementField.GetValue(d);
System\Windows\Controls\TextBox.cs (1)
1873double fontSize = (double)this.GetValue(TextElement.FontSizeProperty);
System\Windows\Controls\TextRangeAdaptor.cs (7)
49TextEffectCollection effects = tp.GetValue(TextElement.TextEffectsProperty) as TextEffectCollection; 60return ColorFromBrush(tp.GetValue(TextElement.BackgroundProperty)); 160return GetFontFamilyName((FontFamily)tp.GetValue(TextElement.FontFamilyProperty), tp); 170return NativeObjectLengthToPoints((double)tp.GetValue(TextElement.FontSizeProperty)); 180FontWeight fontWeight = (FontWeight)tp.GetValue(TextElement.FontWeightProperty); 191return ColorFromBrush(tp.GetValue(TextElement.ForegroundProperty)); 268FontStyle style = (FontStyle)tp.GetValue(TextElement.FontStyleProperty);
System\Windows\Documents\FixedElement.cs (6)
60TextElement.FontFamilyProperty.AddOwner( 64TextElement.FontStyleProperty.AddOwner( 68TextElement.FontWeightProperty.AddOwner( 72TextElement.FontStretchProperty.AddOwner( 76TextElement.FontSizeProperty.AddOwner( 80TextElement.ForegroundProperty.AddOwner(
System\Windows\Documents\FixedSOMTextRun.cs (6)
232element.SetValue(TextElement.FontSizeProperty, _fontSize); 233element.SetValue(TextElement.FontWeightProperty, _fontWeight); 234element.SetValue(TextElement.FontStretchProperty, _fontStretch); 235element.SetValue(TextElement.FontStyleProperty, _fontStyle); 247element.SetValue(TextElement.FontFamilyProperty, new FontFamily(_fontFamily)); 249element.SetValue(TextElement.ForegroundProperty, _foreground);
System\Windows\Documents\FlowDocument.cs (13)
199TextElement.FontFamilyProperty.AddOwner(_typeofThis); 218TextElement.FontStyleProperty.AddOwner(_typeofThis); 233TextElement.FontWeightProperty.AddOwner(_typeofThis); 248TextElement.FontStretchProperty.AddOwner(_typeofThis); 263TextElement.FontSizeProperty.AddOwner( 281TextElement.ForegroundProperty.AddOwner( 297TextElement.BackgroundProperty.AddOwner( 316TextElement.TextEffectsProperty.AddOwner( 890else if (element is TextElement) 892textPointer = ((TextElement)element).ContentStart; 1093_typographyPropertiesGroup = TextElement.GetTypographyProperties(this); 1633if (value is TextElement && ((TextElement)value).Parent != null)
System\Windows\Documents\InlineCollection.cs (2)
159if (this.Parent is TextElement) 161TextSchema.ValidateChild((TextElement)this.Parent, child, true /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */);
System\Windows\Documents\List.cs (1)
209textNav.MoveToPosition(((TextElement)element).ElementEnd);
System\Windows\Documents\RangeContentEnumerator.cs (1)
189_navigator.MoveToPosition(((TextElement)_navigator.Parent).ElementEnd);
System\Windows\Documents\Span.cs (4)
123TextElement commonAncestor = TextElement.GetCommonAncestor((TextElement)start.Parent, (TextElement)end.Parent);
System\Windows\Documents\TextContainer.cs (17)
210TextElement textElement; 224textElement = position.Parent as TextElement; 251TextElement textElement; 271textElement = position.Parent as TextElement; 921TextElement textElement = position.Parent as TextElement; 928internal void InsertElementInternal(TextPointer startPosition, TextPointer endPosition, TextElement element) 1567internal void ExtractElementInternal(TextElement element) 2088TextElement textElement = logicalTreeNode as TextElement; 2380TextElement textElement = startPosition.Parent as TextElement; 2738private char[] ExtractElementInternal(TextElement element, bool deep, out ExtractChangeEventArgs extractChangeEventArgs) 3223TextElement element; 3232element = position.Parent as TextElement; 3389TextElement adjacentElement = startPosition.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
System\windows\Documents\TextEditorCharacters.cs (14)
173object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontWeightProperty); 176TextEditorCharacters._OnApplyProperty(This, TextElement.FontWeightProperty, fontWeight); 193object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontStyleProperty); 196TextEditorCharacters._OnApplyProperty(This, TextElement.FontStyleProperty, fontStyle); 295double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 310TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize); 316TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.IncreaseByAbsoluteValue); 337double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 351TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize); 357TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.DecreaseByAbsoluteValue); 371TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, args.Parameter); 384TextEditorCharacters._OnApplyProperty(This, TextElement.FontFamilyProperty, args.Parameter); 397TextEditorCharacters._OnApplyProperty(This, TextElement.ForegroundProperty, args.Parameter); 410TextEditorCharacters._OnApplyProperty(This, TextElement.BackgroundProperty, args.Parameter);
System\windows\Documents\TextEditorContextMenu.cs (4)
70else if ((This.Selection.IsEmpty || e.TargetElement is TextElement) && 83TextElement element = start.Parent as TextElement; 93element = element.Parent as TextElement;
System\windows\Documents\TextEditorCopyPaste.cs (6)
707if ((element is Section || element is Span) && PasteTextElement(This, (TextElement)element)) 783TextElement textElement = WpfPayload.LoadElement(memoryStream) as TextElement; 873private static bool PasteTextElement(TextEditor This, TextElement sectionOrSpan) 915TextElement flowContent = xamlObject as TextElement;
System\windows\Documents\TextEditorDragDrop.cs (1)
412object fontStylePropertyValue = dragPosition.GetValue(TextElement.FontStyleProperty);
System\windows\Documents\TextEditorSelection.cs (1)
2241double breakWidth = (double)innerMovingPosition.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier;
System\windows\Documents\TextEditorTyping.cs (5)
1431TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1434parent = parent.Parent as TextElement; 1878pointer.Parent is TextElement && 1879TextSchema.HasHyperlinkAncestor((TextElement)pointer.Parent))
System\Windows\Documents\TextEffectResolver.cs (1)
165_element.SetValue(TextElement.TextEffectsProperty, textEffects);
System\Windows\Documents\TextElement.cs (33)
46typographyProperties[i].OverrideMetadata(typeof(TextElement), new FrameworkPropertyMetadata(typographyChanged)); 274internal static readonly UncommonField<TextElement> ContainerTextElementField = new UncommonField<TextElement>(); 447typeof(TextElement), 497typeof(TextElement), 542typeof(TextElement), 587typeof(TextElement), 632typeof(TextElement), 681typeof(TextElement), 727typeof(TextElement), 748typeof(TextElement), 791TextElement te = value as TextElement; 1095TextElement child = children.Current as TextElement; 1107internal static TextElement GetCommonAncestor(TextElement element1, TextElement element2) 1113TextElement element; 1116for (element = element1; element.Parent is TextElement; element = (TextElement)element.Parent) 1120for (element = element2; element.Parent is TextElement; element = (TextElement)element.Parent) 1129element1 = (TextElement)element1.Parent; 1135element2 = (TextElement)element2.Parent; 1142element1 = element1.Parent as TextElement; 1143element2 = element2.Parent as TextElement; 1320((TextElement) element)._typographyPropertiesGroup = null; 1400internal TextElement NextElement 1418internal TextElement PreviousElement 1436internal TextElement FirstChildElement 1454internal TextElement LastChildElement 1517private void Append(TextElement element)
System\Windows\Documents\TextElementCollection.cs (14)
16public class TextElementCollection<TextElementType> : IList, ICollection<TextElementType> where TextElementType : TextElement 41Invariant.Assert(owner is TextElement || owner is FlowDocument || owner is TextBlock); 45Invariant.Assert(owner is TextElement); 155TextElement element; 679return _isOwnerParent ? _owner : ((TextElement)_owner).Parent; 700textContainer = ((TextElement)_owner).TextContainer; 715if (this.Parent is TextElement) 717firstChild = (TextElementType)((TextElement)this.Parent).FirstChildElement; 738if (this.Parent is TextElement) 740lastChild = (TextElementType)((TextElement)this.Parent).LastChildElement; 961this.Parent is TextElement ? ((TextElement)this.Parent).ContentStart : this.TextContainer.Start; 972this.Parent is TextElement ? ((TextElement)this.Parent).ContentEnd : this.TextContainer.End;
System\Windows\Documents\TextElementEnumerator.cs (1)
11internal class TextElementEnumerator<TextElementType> : IEnumerator<TextElementType> where TextElementType : TextElement
System\Windows\Documents\TextPointer.cs (26)
22/// <para>b) Get a <see cref="TextElement"/> scoping or adjacent a position of this TextPointer;</para> 43/// for opening and closing tags of <see cref="TextElement"/> elements, <c>EmbeddedElement</c> 58/// <see cref="TextElement.ElementStart"/> and <see cref="TextElement.ElementEnd"/>, 59/// <see cref="TextElement.ContentStart"/> and <see cref="TextElement.ContentEnd"/>, etc. 631/// muchy attention to a difference between the <see cref="TextElement"/> 794/// <para>The returned element may be both a <see cref="TextElement"/> 796/// <para><see cref="TextElement"/> object will be returned when 830/// <para>- opening or closing tag of a <see cref="TextElement"/>.</para> 892/// <para>- opening or closing tag of a <see cref="TextElement"/>.</para> 1380internal void InsertTextElement(TextElement textElement) 1734TextElement ancestor = this.Parent as TextElement; 1738ancestor = ancestor.Parent as TextElement; 2145if (!((TextElement)this.Parent).IsEmpty) // the parent may be InlineUIContainer or BlockUIContainer 2162internal TextElement GetAdjacentElementFromOuterPosition(LogicalDirection direction) 2521TextElement element; 2529element = this.Parent as TextElement; 2546element = this.Parent as TextElement; 3576TextElement element1 = position1.Parent as TextElement; 3577TextElement element2 = position2.Parent as TextElement; 3591commonAncestor = TextElement.GetCommonAncestor(element1, element2); 4116private TextElement GetElement(LogicalDirection direction)
System\Windows\Documents\TextPointerBase.cs (2)
162internal static bool IsAtPotentialRunPosition(TextElement run) 300return IsInAncestorScope(position, typeof(TextElement), typeof(AnchoredBlock));
System\Windows\Documents\TextRange.cs (3)
1074internal virtual void SetXmlVirtual(TextElement fragment) 1364TextElement fragment = xamlObject as TextElement;
System\Windows\Documents\TextRangeBase.cs (19)
442DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 447element = element is TextElement ? ((TextElement)element).Parent : null; 1574thisRange.SetXmlVirtual((TextElement)element); 1586TextElement textElement = WpfPayload.LoadElement(memoryStream) as TextElement; 1822TextElement outerAnchoredBlock = start.Parent as TextElement; 1828outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1835TextElement innerElement = end.Parent as TextElement; 1842innerElement = innerElement.Parent as TextElement; 1859outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1864outerAnchoredBlock = end.Parent as TextElement; 1870outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1877TextElement innerElement = start.Parent as TextElement; 1884innerElement = innerElement.Parent as TextElement; 1901outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement;
System\Windows\Documents\TextRangeEdit.cs (23)
28internal static TextElement InsertElementClone(TextPointer start, TextPointer end, TextElement element) 30TextElement newElement = (TextElement)Activator.CreateInstance(element.GetType()); 419TextElement parent = (TextElement)start.Parent; 523TextElement element = (TextElement)position.Parent; 530TextElement newElement; 1203private static void SetPropertyValue(TextElement element, DependencyProperty property, object currentValue, object newValue) 1287TextElement commonAncestor = position.Parent as TextElement; 1442TextElement parent = (TextElement)startPosition.Parent; 1714private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, TextElement limitingAncestor) 1745private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, bool preserveStructuralFormatting, TextElement limitingAncestor) 1883Invariant.Assert(formattingProperty == TextElement.FontSizeProperty, "Only FontSize can be incremented/decremented among character properties"); 1962ApplyStructuralInlinePropertyAcrossInline(start, end, (TextElement)commonAncestor, formattingProperty, value); 2048TextElement limit = (TextElement)conflictingParent.Parent; 2145start = SplitFormattingElements(start, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement); 2146end = SplitFormattingElements(end, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement); 2156private static void ApplyStructuralInlinePropertyAcrossInline(TextPointer start, TextPointer end, TextElement commonAncestor, DependencyProperty formattingProperty, object value)
System\Windows\Documents\TextRangeEditLists.cs (7)
77TextElement parentBlock = (TextElement)secondParagraphOrBlockUIContainer.Parent; 99TextElement previousBlock = secondParagraphOrBlockUIContainer.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as TextElement; 469TextElement parent = (TextElement)lastListItem.Parent; 474parent = (TextElement)parent.Parent;
System\Windows\Documents\TextRangeEditTables.cs (19)
109TextElement element = position.Parent as TextElement; 112element = element.Parent as TextElement; 121TextElement element = position.Parent as TextElement; 124element = element.Parent as TextElement; 133TextElement element = position.Parent as TextElement; 136element = element.Parent as TextElement; 630TextElement ancestor = insertionPosition.Parent as TextElement; 641ancestor = ancestor.Parent as TextElement; 2151TextElement commonAncestor = anchorPosition.Parent as TextElement; 2154commonAncestor = commonAncestor.Parent as TextElement; 2168TextElement commonAncestor, 2180TextElement element = position.Parent as TextElement; 2212element = element.Parent as TextElement;
System\Windows\Documents\TextRangeSerialization.cs (19)
136internal static void PasteXml(TextRange range, TextElement fragment) 217TextElement nextElement = (TextElement)textReader.GetAdjacentElement(LogicalDirection.Forward); 355Invariant.Assert(typeof(TextElement).IsAssignableFrom(pointer.ParentType), "pointer must be still in a scope of TextElement"); 424Invariant.Assert(typeof(TextElement).IsAssignableFrom(thisElement.ParentType), "thisElement is expected to be a TextElement"); 860if (property == Inline.BaselineAlignmentProperty || property == TextElement.TextEffectsProperty) 1221private static bool PasteSingleEmbeddedElement(TextRange range, TextElement fragment) 1225TextElement uiContainer = fragment.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 1254private static void PasteTextFragment(TextElement fragment, TextRange range) 1276private static void PasteNonMergeableTextFragment(TextElement fragment, TextRange range) 1293private static void PasteMergeableTextFragment(TextElement fragment, TextRange range, TextPointer insertionPosition) 1533private static void AdjustFragmentForTargetRange(TextElement fragment, TextRange range) 1554private static void ApplyContextualProperties(TextPointer start, TextPointer end, TextElement propertyBag) 1612TextElement element = (TextElement)start.Parent; 1676while (typeof(TextElement).IsAssignableFrom(runningEnd.ParentType) && !runningEnd.HasEqualScope(commonAncestor)) 1695if (typeof(TextElement).IsAssignableFrom(commonAncestor.ParentType)) 1735while (typeof(TextElement).IsAssignableFrom(navigator.ParentType))
System\Windows\Documents\TextSchema.cs (37)
46TextElement.FontFamilyProperty, 47TextElement.FontStyleProperty, 48TextElement.FontWeightProperty, 49TextElement.FontStretchProperty, 50TextElement.FontSizeProperty, 51TextElement.ForegroundProperty, 100internal static bool ValidateChild(TextElement parent, TextElement child, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 119internal static bool IsValidChild(TextElement parent, Type childType) 124internal static bool ValidateChild(TextElement parent, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 161TextElement leftElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward); 162TextElement rightElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 167if (parent is TextElement) 169return ValidateChild((TextElement)parent, childType, throwIfIllegalChild, throwIfIllegalHyperlinkDescendent); 218if (typeof(TextElement).IsAssignableFrom(position.ParentType) && 233Invariant.Assert(!typeof(TextElement).IsAssignableFrom(parentType)); 238internal static bool HasHyperlinkAncestor(TextElement element) 269return elementType.Module == typeof(System.Windows.Documents.TextElement).Module || // presentationframework 465Invariant.Assert(typeof(TextElement).IsAssignableFrom(type) || typeof(TableColumn).IsAssignableFrom(type), 880private static bool HasIllegalHyperlinkDescendant(TextElement element, bool throwIfIllegalDescendent) 890TextElement nextElement = (TextElement)start.GetAdjacentElement(LogicalDirection.Forward); 918string string1 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush1); 919string string2 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush2); 958TextElement.BackgroundProperty, 972TextElement.BackgroundProperty, 993TextElement.BackgroundProperty, 1011TextElement.BackgroundProperty, 1025TextElement.BackgroundProperty, 1041TextElement.BackgroundProperty, 1056TextElement.BackgroundProperty, 1064TextElement.BackgroundProperty, 1080TextElement.BackgroundProperty, 1097TextElement.BackgroundProperty, 1120TextElement.BackgroundProperty, 1137TextElement.BackgroundProperty, 1144TextElement.BackgroundProperty,
System\windows\Documents\TextSelection.cs (8)
1322internal override void SetXmlVirtual(TextElement fragment) 1487noninheritableProperties[i] != TextElement.TextEffectsProperty && 1495element = ((TextElement)element).Parent; 1629backgroundPropertyValue = ((TextSelection)focusedTextSelection).GetCurrentValue(TextElement.BackgroundProperty); 2028fontStylePropertyValue = ((TextSelection)textSelection).GetCurrentValue(TextElement.FontStyleProperty); 2118object fontStylePropertyValue = GetPropertyValue(TextElement.FontStyleProperty); 2215double fontSize = (double)currentTextSelection.GetPropertyValue(TextElement.FontSizeProperty); 2216FontFamily fontFamily = (FontFamily)currentTextSelection.GetPropertyValue(TextElement.FontFamilyProperty);
System\Windows\Documents\TextServicesDisplayAttribute.cs (1)
98return ((SolidColorBrush)position.GetValue(TextElement.ForegroundProperty)).Color;
System\Windows\Documents\TextStore.cs (14)
428TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward); 847(double)UiScope.GetValue(TextElement.FontSizeProperty), 848(FontFamily)UiScope.GetValue(TextElement.FontFamilyProperty), 867(double)position.GetValue(TextElement.FontSizeProperty), 868(FontFamily)position.GetValue(TextElement.FontFamilyProperty), 1251TextElement startElement = (TextElement)((TextPointer)start).Parent; 1252TextElement endElement = (TextElement)((TextPointer)end).Parent; 1253TextElement commonAncestor = TextElement.GetCommonAncestor(startElement, endElement); 3456TextElement element = start.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
418TextElement element; 421element = (TextElement)Activator.CreateInstance(_elementType);
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
54TextElement element; 62element = (TextElement)Activator.CreateInstance(_type);
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (1)
49TextElement element;
System\Windows\Documents\TextTreeTextElementNode.cs (2)
307internal TextElement TextElement 385private TextElement _textElement;
System\Windows\Documents\TextTreeUndo.cs (1)
52internal static void CreatePropertyUndoUnit(TextElement element, DependencyPropertyChangedEventArgs e)
System\Windows\Documents\ValidationHelper.cs (2)
111if (child is TextElement) 113if (((TextElement)child).Parent != null)
System\Windows\FrameworkElement.cs (12)
2393TextElement.FontFamilyProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontFamily, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontFamily))); 2394TextElement.FontSizeProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.ThemeMessageFontSize, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontSize))); 2395TextElement.FontStyleProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontStyle, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontStyle))); 2396TextElement.FontWeightProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontWeight, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontWeight))); 5541if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontFamilyProperty)) 5552if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontSizeProperty)) 5563if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontStyleProperty)) 5574if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontWeightProperty)) 5607CoerceValue(TextElement.FontFamilyProperty); 5608CoerceValue(TextElement.FontSizeProperty); 5609CoerceValue(TextElement.FontStyleProperty); 5610CoerceValue(TextElement.FontWeightProperty);
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
741case 648: t = () => typeof(TextElement); break;
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (21)
3820Type type = typeof(System.Windows.Documents.TextElement); 3821DependencyProperty dp = System.Windows.Documents.TextElement.BackgroundProperty; 3823this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3839Type type = typeof(System.Windows.Documents.TextElement); 3840DependencyProperty dp = System.Windows.Documents.TextElement.FontFamilyProperty; 3842this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3858Type type = typeof(System.Windows.Documents.TextElement); 3859DependencyProperty dp = System.Windows.Documents.TextElement.FontSizeProperty; 3861this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3877Type type = typeof(System.Windows.Documents.TextElement); 3878DependencyProperty dp = System.Windows.Documents.TextElement.FontStretchProperty; 3880this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3896Type type = typeof(System.Windows.Documents.TextElement); 3897DependencyProperty dp = System.Windows.Documents.TextElement.FontStyleProperty; 3899this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3915Type type = typeof(System.Windows.Documents.TextElement); 3916DependencyProperty dp = System.Windows.Documents.TextElement.FontWeightProperty; 3918this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3934Type type = typeof(System.Windows.Documents.TextElement); 3935DependencyProperty dp = System.Windows.Documents.TextElement.ForegroundProperty; 3937this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
11163typeof(System.Windows.Documents.TextElement),
System\Windows\Markup\KnownTypes.cs (8)
1909return System.Windows.Documents.TextElement.BackgroundProperty; 1911return System.Windows.Documents.TextElement.FontFamilyProperty; 1913return System.Windows.Documents.TextElement.FontSizeProperty; 1915return System.Windows.Documents.TextElement.FontStretchProperty; 1917return System.Windows.Documents.TextElement.FontStyleProperty; 1919return System.Windows.Documents.TextElement.FontWeightProperty; 1921return System.Windows.Documents.TextElement.ForegroundProperty; 6195case KnownElements.TextElement: t = typeof(System.Windows.Documents.TextElement); break;
System\Windows\SystemResources.cs (4)
1251fe.CoerceValue(TextElement.FontFamilyProperty); 1252fe.CoerceValue(TextElement.FontSizeProperty); 1253fe.CoerceValue(TextElement.FontStyleProperty); 1254fe.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)
582ribbonGroup._headerContentPresenter.SetValue(TextElement.ForegroundProperty, e.NewValue); 586ribbonGroup._headerContentPresenter.ClearValue(TextElement.ForegroundProperty);