6 types derived from TextElement
PresentationFramework (6)
System\Windows\Documents\Block.cs (1)
24public abstract class Block : TextElement
System\Windows\Documents\Inline.cs (1)
17public abstract class Inline : TextElement
System\Windows\Documents\ListItem.cs (1)
23public class ListItem : TextElement
System\Windows\Documents\TableCell.cs (1)
34public class TableCell : TextElement, IIndexedChild<TableRow>
System\Windows\Documents\TableRow.cs (1)
23public class TableRow : TextElement, IAddChild, IIndexedChild<TableRowGroup>, IAcceptInsertion
System\Windows\Documents\TableRowGroup.cs (1)
16public 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)
495TextElement textElement = startNode as TextElement;
MS\Internal\Documents\ContentElementCollection.cs (1)
23where TParent : TextElement, IAcceptInsertion
MS\Internal\Documents\ContentHostHelper.cs (4)
46if (contentElement is TextElement) 48textContainer = ((TextElement)contentElement).TextContainer; 56ich = GetICHFromFlowDocument((TextElement)contentElement, (FlowDocument)parent); 85private static IContentHost GetICHFromFlowDocument(TextElement contentElement, FlowDocument flowDocument)
MS\Internal\Documents\DocumentViewerHelper.cs (4)
394e.TargetElement is TextElement) 396contextMenuPosition = ((TextElement)e.TargetElement).ContentStart; 405else if (e.TargetElement is TextElement) 407contextMenuPosition = ((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)
18where TParent : TextElement, IAcceptInsertion 19where TElementType : TextElement, IIndexedChild<TParent>
MS\Internal\Documents\TextContainerHelper.cs (16)
398while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 441while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 457while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 502internal static TextContentRange GetTextContentRangeForTextElement(TextElement textElement) 513internal static TextContentRange GetTextContentRangeForTextElementEdge(TextElement textElement, ElementEdge edge) 541if (element is TextElement) 543textPointer = ((TextElement)element).ContentStart; 563if (element is TextElement) 565length = ((TextElement)element).SymbolCount; 604TextElement uiContainer = embeddedObject.Parent as TextElement; 626TextElement textElement; 628textElement = element as TextElement; 680TextElement textElement; 682textElement = element as TextElement; 706if (fe.Parent is TextElement uiContainer)
MS\Internal\Documents\TextDocumentView.cs (6)
798position = ((TextElement)rowResult.Element).ElementEnd; 814position = ((TextElement)paragraph.Element).ContentStart; 3442TextElement textElement = paragraphResult.Element as TextElement; 3472TextElement textElement = paragraphResult.Element as TextElement;
MS\Internal\PtsHost\BaseParagraph.cs (1)
299if (this is TextParagraph && Element is TextElement)
MS\Internal\PtsHost\ContainerParaClient.cs (3)
190Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 263TextElement elementOwner = this.Paragraph.Element as TextElement;
MS\Internal\PtsHost\ContainerParagraph.cs (3)
1020if(!(Element is TextElement) || ((TextElement)Element).ContentStart != textPointer) 1045TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\FigureParaClient.cs (3)
360Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 534Paragraph.Element as TextElement, ElementEdge.BeforeStart)); 542Paragraph.Element as TextElement, ElementEdge.AfterEnd));
MS\Internal\PtsHost\FloaterBaseParagraph.cs (1)
30protected FloaterBaseParagraph(TextElement element, StructuralCache structuralCache)
MS\Internal\PtsHost\FloaterParaClient.cs (3)
367Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 542Paragraph.Element as TextElement, ElementEdge.BeforeStart)); 550Paragraph.Element as TextElement, ElementEdge.AfterEnd));
MS\Internal\PtsHost\FloaterParagraph.cs (1)
32internal FloaterParagraph(TextElement element, StructuralCache structuralCache)
MS\Internal\PtsHost\FlowDocumentPage.cs (5)
323if (child is TextElement) 325TextPointer elementEnd = new TextPointer(((TextElement)child).ElementEnd); 932if (e is TextElement) 934if ((e as TextElement).TextContainer == _structuralCache.TextContainer) 937elementPosition = new TextPointer((e as TextElement).ElementStart);
MS\Internal\PtsHost\LineBase.cs (4)
135TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 257TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
MS\Internal\PtsHost\ListParaClient.cs (1)
58Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty);
MS\Internal\PtsHost\ListParagraph.cs (1)
71TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\MbpInfo.cs (2)
30MbpInfo mbp = new MbpInfo((TextElement)o); 99private MbpInfo(TextElement block)
MS\Internal\PtsHost\SubpageParaClient.cs (3)
293Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 509TextElement elementOwner = this.Paragraph.Element as TextElement;
MS\Internal\PtsHost\TableParaClient.cs (6)
221Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty); 516TextElement elementOwner = this.Paragraph.Element as TextElement; 1845rowGroupBackgroundBrush = (Brush)tableRowGroup.GetValue(TextElement.BackgroundProperty); 1864rowGroupBackgroundBrush = (Brush)tableRowGroup.GetValue(TextElement.BackgroundProperty); 1892Brush rowBackgroundBrush = (Brush)row.GetValue(TextElement.BackgroundProperty);
MS\Internal\PtsHost\TextParaClient.cs (2)
1883endOfParaGlyphWidth = ((double)TextParagraph.Element.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier); 1993endOfParaGlyphWidth = ((double)TextParagraph.Element.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier);
MS\Internal\PtsHost\TextParagraph.cs (8)
867TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 882private List<TextElement> GetAttachedObjectElements(int dcpFirst, int dcpLast) 884List<TextElement> attachedElements = new List<TextElement>(); 897TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 923List<TextElement> textElements = GetAttachedObjectElements(dcpFirst, dcpLast); 940List<TextElement> textElements = GetAttachedObjectElements(dcpFirst, dcpLast); 944TextElement textElement = textElements[index];
MS\Internal\PtsHost\UIElementParaClient.cs (1)
133Brush backgroundBrush = (Brush)Paragraph.Element.GetValue(TextElement.BackgroundProperty);
MS\Internal\PtsHost\UIElementParagraph.cs (1)
31internal UIElementParagraph(TextElement element, StructuralCache structuralCache)
MS\Internal\Text\ComplexLine.cs (5)
302element = position.Parent as TextElement; 385TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 476TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward);
MS\Internal\Text\DynamicPropertyReader.cs (12)
40FontFamily fontFamily = (FontFamily) element.GetValue(TextElement.FontFamilyProperty); 41FontStyle fontStyle = (FontStyle) element.GetValue(TextElement.FontStyleProperty); 42FontWeight fontWeight = (FontWeight) element.GetValue(TextElement.FontWeightProperty); 43FontStretch fontStretch = (FontStretch) element.GetValue(TextElement.FontStretchProperty); 52FontStyle fontStyle = (FontStyle) element.GetValue(TextElement.FontStyleProperty); 53FontWeight fontWeight = (FontWeight) element.GetValue(TextElement.FontWeightProperty); 54FontStretch fontStretch = (FontStretch) element.GetValue(TextElement.FontStretchProperty); 118return GetCollectionValue(element, TextElement.TextEffectsProperty) as TextEffectCollection; 207FontFamily fontFamily = (FontFamily)d.GetValue(TextElement.FontFamilyProperty); 208double fontSize = (double)d.GetValue(TextElement.FontSizeProperty); 235backgroundBrush = (Brush)element.GetValue(TextElement.BackgroundProperty); 258backgroundBrush = (Brush)position.GetValue(TextElement.BackgroundProperty);
MS\Internal\Text\TextProperties.cs (7)
116_typographyProperties = TextElement.GetTypographyProperties(target); 204_fontSize = (double)target.GetValue(TextElement.FontSizeProperty); 205_foreground = (Brush) target.GetValue(TextElement.ForegroundProperty); 262return TextElement.GetTypographyProperties(element); 275return TextElement.GetTypographyProperties(element); 283TextElement te = element as TextElement;
System\Windows\Automation\Peers\TextElementAutomationPeer.cs (14)
26public TextElementAutomationPeer(TextElement owner) 39TextElement textElement = (TextElement)Owner; 48TextElement textElement = (TextElement)Owner; 95TextElement textElement = (TextElement)Owner; 149TextElement textElement = (TextElement)Owner; 169private Rect CalculateVisibleRect(ITextView textView, TextElement textElement, TextPointer startPointer, TextPointer endPointer) 210TextElement textElement = (TextElement)Owner; 221TextElement textElement = (TextElement)Owner;
System\Windows\Controls\AccessText.cs (8)
153TextElement.FontFamilyProperty.AddOwner(typeof(AccessText)); 172TextElement.FontStyleProperty.AddOwner(typeof(AccessText)); 187TextElement.FontWeightProperty.AddOwner(typeof(AccessText)); 202TextElement.FontStretchProperty.AddOwner(typeof(AccessText)); 217TextElement.FontSizeProperty.AddOwner(typeof(AccessText)); 234TextElement.ForegroundProperty.AddOwner(typeof(AccessText)); 249TextElement.BackgroundProperty.AddOwner( 289TextElement.TextEffectsProperty.AddOwner(
System\Windows\Controls\ComboBox.cs (2)
1603TextElement textElement; 1618else if ((textElement = d as TextElement) != null)
System\Windows\Controls\Control.cs (7)
135TextElement.ForegroundProperty.AddOwner( 159TextElement.FontFamilyProperty.AddOwner( 184TextElement.FontSizeProperty.AddOwner( 210= TextElement.FontStretchProperty.AddOwner(typeof(Control), 211new FrameworkPropertyMetadata(TextElement.FontStretchProperty.DefaultMetadata.DefaultValue, 233TextElement.FontStyleProperty.AddOwner( 257TextElement.FontWeightProperty.AddOwner(
System\Windows\Controls\DataGridTextColumn.cs (15)
112DataGridHelper.SyncColumnProperty(this, e, TextElement.FontFamilyProperty, FontFamilyProperty); 113DataGridHelper.SyncColumnProperty(this, e, TextElement.FontSizeProperty, FontSizeProperty); 114DataGridHelper.SyncColumnProperty(this, e, TextElement.FontStyleProperty, FontStyleProperty); 115DataGridHelper.SyncColumnProperty(this, e, TextElement.FontWeightProperty, FontWeightProperty); 116DataGridHelper.SyncColumnProperty(this, e, TextElement.ForegroundProperty, ForegroundProperty); 132DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontFamilyProperty, FontFamilyProperty); 135DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontSizeProperty, FontSizeProperty); 138DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontStyleProperty, FontStyleProperty); 141DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontWeightProperty, FontWeightProperty); 144DataGridHelper.SyncColumnProperty(this, textElement, TextElement.ForegroundProperty, ForegroundProperty); 297TextElement.FontFamilyProperty.AddOwner( 318TextElement.FontSizeProperty.AddOwner( 341TextElement.FontStyleProperty.AddOwner( 362TextElement.FontWeightProperty.AddOwner( 383TextElement.ForegroundProperty.AddOwner(
System\Windows\Controls\Page.cs (3)
432TextElement.ForegroundProperty.AddOwner(typeof(Page)); 451TextElement.FontFamilyProperty.AddOwner(typeof(Page)); 473TextElement.FontSizeProperty.AddOwner(typeof(Page));
System\Windows\Controls\TextAdaptor.cs (5)
597if (childElement is TextElement) 599rangeStart = ((TextElement)childElement).ElementStart; 600rangeEnd = ((TextElement)childElement).ElementEnd; 607rangeStart = ((TextElement)parent).ContentStart; 608rangeEnd = ((TextElement)parent).ContentEnd;
System\Windows\Controls\TextBlock.cs (17)
621TextElement.FontFamilyProperty.AddOwner(typeof(TextBlock)); 661TextElement.FontStyleProperty.AddOwner(typeof(TextBlock)); 700TextElement.FontWeightProperty.AddOwner(typeof(TextBlock)); 739TextElement.FontStretchProperty.AddOwner(typeof(TextBlock)); 778TextElement.FontSizeProperty.AddOwner( 821TextElement.ForegroundProperty.AddOwner( 861TextElement.BackgroundProperty.AddOwner( 901TextElement.TextEffectsProperty.AddOwner( 1759if (child is TextElement) 1761end = new TextPointer(((TextElement)child).ElementEnd); 3498else if (element is TextElement) 3500if (textBlock._complexContent.TextContainer != ((TextElement)element).TextContainer) 3644if (e is TextElement) 3646if ((e as TextElement).TextContainer == _complexContent.TextContainer) 3649position = new TextPointer((e as TextElement).ElementStart); 3709TextElement te = TextElement.ContainerTextElementField.GetValue(d);
System\Windows\Controls\TextBox.cs (1)
1874double fontSize = (double)this.GetValue(TextElement.FontSizeProperty);
System\Windows\Controls\TextRangeAdaptor.cs (7)
50TextEffectCollection effects = tp.GetValue(TextElement.TextEffectsProperty) as TextEffectCollection; 61return ColorFromBrush(tp.GetValue(TextElement.BackgroundProperty)); 161return GetFontFamilyName((FontFamily)tp.GetValue(TextElement.FontFamilyProperty), tp); 171return NativeObjectLengthToPoints((double)tp.GetValue(TextElement.FontSizeProperty)); 181FontWeight fontWeight = (FontWeight)tp.GetValue(TextElement.FontWeightProperty); 192return ColorFromBrush(tp.GetValue(TextElement.ForegroundProperty)); 269FontStyle style = (FontStyle)tp.GetValue(TextElement.FontStyleProperty);
System\Windows\Documents\FixedElement.cs (6)
61TextElement.FontFamilyProperty.AddOwner( 65TextElement.FontStyleProperty.AddOwner( 69TextElement.FontWeightProperty.AddOwner( 73TextElement.FontStretchProperty.AddOwner( 77TextElement.FontSizeProperty.AddOwner( 81TextElement.ForegroundProperty.AddOwner(
System\Windows\Documents\FixedSOMTextRun.cs (6)
233element.SetValue(TextElement.FontSizeProperty, _fontSize); 234element.SetValue(TextElement.FontWeightProperty, _fontWeight); 235element.SetValue(TextElement.FontStretchProperty, _fontStretch); 236element.SetValue(TextElement.FontStyleProperty, _fontStyle); 248element.SetValue(TextElement.FontFamilyProperty, new FontFamily(_fontFamily)); 250element.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)
160if (this.Parent is TextElement) 162TextSchema.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)
190_navigator.MoveToPosition(((TextElement)_navigator.Parent).ElementEnd);
System\Windows\Documents\Span.cs (4)
133TextElement commonAncestor = TextElement.GetCommonAncestor((TextElement)start.Parent, (TextElement)end.Parent);
System\Windows\Documents\TextContainer.cs (17)
211TextElement textElement; 225textElement = position.Parent as TextElement; 252TextElement textElement; 272textElement = position.Parent as TextElement; 922TextElement textElement = position.Parent as TextElement; 932internal void InsertElementInternal(TextPointer startPosition, TextPointer endPosition, TextElement element) 1574internal void ExtractElementInternal(TextElement element) 2095TextElement textElement = logicalTreeNode as TextElement; 2399TextElement textElement = startPosition.Parent as TextElement; 2763private char[] ExtractElementInternal(TextElement element, bool deep, out ExtractChangeEventArgs extractChangeEventArgs) 3251TextElement element; 3260element = position.Parent as TextElement; 3417TextElement adjacentElement = startPosition.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
System\windows\Documents\TextEditorCharacters.cs (14)
174object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontWeightProperty); 177TextEditorCharacters._OnApplyProperty(This, TextElement.FontWeightProperty, fontWeight); 194object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontStyleProperty); 197TextEditorCharacters._OnApplyProperty(This, TextElement.FontStyleProperty, fontStyle); 296double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 311TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize); 317TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.IncreaseByAbsoluteValue); 338double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 352TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize); 358TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.DecreaseByAbsoluteValue); 372TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, args.Parameter); 385TextEditorCharacters._OnApplyProperty(This, TextElement.FontFamilyProperty, args.Parameter); 398TextEditorCharacters._OnApplyProperty(This, TextElement.ForegroundProperty, args.Parameter); 411TextEditorCharacters._OnApplyProperty(This, TextElement.BackgroundProperty, args.Parameter);
System\windows\Documents\TextEditorContextMenu.cs (4)
71else if ((This.Selection.IsEmpty || e.TargetElement is TextElement) && 84TextElement element = start.Parent as TextElement; 94element = element.Parent as TextElement;
System\windows\Documents\TextEditorCopyPaste.cs (6)
708if ((element is Section || element is Span) && PasteTextElement(This, (TextElement)element)) 784TextElement textElement = WpfPayload.LoadElement(memoryStream) as TextElement; 874private static bool PasteTextElement(TextEditor This, TextElement sectionOrSpan) 916TextElement flowContent = xamlObject as TextElement;
System\windows\Documents\TextEditorDragDrop.cs (1)
413object fontStylePropertyValue = dragPosition.GetValue(TextElement.FontStyleProperty);
System\windows\Documents\TextEditorSelection.cs (1)
2242double breakWidth = (double)innerMovingPosition.GetValue(TextElement.FontSizeProperty) * CaretElement.c_endOfParaMagicMultiplier;
System\windows\Documents\TextEditorTyping.cs (5)
1444TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1447parent = parent.Parent as TextElement; 1891pointer.Parent is TextElement && 1892TextSchema.HasHyperlinkAncestor((TextElement)pointer.Parent))
System\Windows\Documents\TextEffectResolver.cs (1)
166_element.SetValue(TextElement.TextEffectsProperty, textEffects);
System\Windows\Documents\TextElement.cs (33)
47typographyProperties[i].OverrideMetadata(typeof(TextElement), new FrameworkPropertyMetadata(typographyChanged)); 275internal static readonly UncommonField<TextElement> ContainerTextElementField = new UncommonField<TextElement>(); 448typeof(TextElement), 498typeof(TextElement), 543typeof(TextElement), 588typeof(TextElement), 633typeof(TextElement), 682typeof(TextElement), 728typeof(TextElement), 749typeof(TextElement), 792TextElement te = value as TextElement; 1096TextElement child = children.Current as TextElement; 1111internal static TextElement GetCommonAncestor(TextElement element1, TextElement element2) 1117TextElement element; 1120for (element = element1; element.Parent is TextElement; element = (TextElement)element.Parent) 1124for (element = element2; element.Parent is TextElement; element = (TextElement)element.Parent) 1133element1 = (TextElement)element1.Parent; 1139element2 = (TextElement)element2.Parent; 1146element1 = element1.Parent as TextElement; 1147element2 = element2.Parent as TextElement; 1324((TextElement) element)._typographyPropertiesGroup = null; 1404internal TextElement NextElement 1422internal TextElement PreviousElement 1440internal TextElement FirstChildElement 1458internal TextElement LastChildElement 1521private void Append(TextElement element)
System\Windows\Documents\TextElementCollection.cs (14)
17public class TextElementCollection<TextElementType> : IList, ICollection<TextElementType> where TextElementType : TextElement 42Invariant.Assert(owner is TextElement || owner is FlowDocument || owner is TextBlock); 46Invariant.Assert(owner is TextElement); 156TextElement element; 680return _isOwnerParent ? _owner : ((TextElement)_owner).Parent; 701textContainer = ((TextElement)_owner).TextContainer; 716if (this.Parent is TextElement) 718firstChild = (TextElementType)((TextElement)this.Parent).FirstChildElement; 739if (this.Parent is TextElement) 741lastChild = (TextElementType)((TextElement)this.Parent).LastChildElement; 962this.Parent is TextElement ? ((TextElement)this.Parent).ContentStart : this.TextContainer.Start; 973this.Parent is TextElement ? ((TextElement)this.Parent).ContentEnd : this.TextContainer.End;
System\Windows\Documents\TextElementEnumerator.cs (1)
12internal class TextElementEnumerator<TextElementType> : IEnumerator<TextElementType> where TextElementType : TextElement
System\Windows\Documents\TextPointer.cs (26)
23/// <para>b) Get a <see cref="TextElement"/> scoping or adjacent a position of this TextPointer;</para> 44/// for opening and closing tags of <see cref="TextElement"/> elements, <c>EmbeddedElement</c> 59/// <see cref="TextElement.ElementStart"/> and <see cref="TextElement.ElementEnd"/>, 60/// <see cref="TextElement.ContentStart"/> and <see cref="TextElement.ContentEnd"/>, etc. 632/// muchy attention to a difference between the <see cref="TextElement"/> 795/// <para>The returned element may be both a <see cref="TextElement"/> 797/// <para><see cref="TextElement"/> object will be returned when 831/// <para>- opening or closing tag of a <see cref="TextElement"/>.</para> 893/// <para>- opening or closing tag of a <see cref="TextElement"/>.</para> 1381internal void InsertTextElement(TextElement textElement) 1735TextElement ancestor = this.Parent as TextElement; 1739ancestor = ancestor.Parent as TextElement; 2146if (!((TextElement)this.Parent).IsEmpty) // the parent may be InlineUIContainer or BlockUIContainer 2163internal TextElement GetAdjacentElementFromOuterPosition(LogicalDirection direction) 2522TextElement element; 2530element = this.Parent as TextElement; 2547element = this.Parent as TextElement; 3577TextElement element1 = position1.Parent as TextElement; 3578TextElement element2 = position2.Parent as TextElement; 3592commonAncestor = TextElement.GetCommonAncestor(element1, element2); 4117private TextElement GetElement(LogicalDirection direction)
System\Windows\Documents\TextPointerBase.cs (2)
163internal static bool IsAtPotentialRunPosition(TextElement run) 301return IsInAncestorScope(position, typeof(TextElement), typeof(AnchoredBlock));
System\Windows\Documents\TextRange.cs (3)
1075internal virtual void SetXmlVirtual(TextElement fragment) 1365TextElement fragment = xamlObject as TextElement;
System\Windows\Documents\TextRangeBase.cs (19)
443DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 448element = element is TextElement ? ((TextElement)element).Parent : null; 1575thisRange.SetXmlVirtual((TextElement)element); 1587TextElement textElement = WpfPayload.LoadElement(memoryStream) as TextElement; 1823TextElement outerAnchoredBlock = start.Parent as TextElement; 1829outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1836TextElement innerElement = end.Parent as TextElement; 1843innerElement = innerElement.Parent as TextElement; 1860outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1865outerAnchoredBlock = end.Parent as TextElement; 1871outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1878TextElement innerElement = start.Parent as TextElement; 1885innerElement = innerElement.Parent as TextElement; 1902outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement;
System\Windows\Documents\TextRangeEdit.cs (23)
29internal static TextElement InsertElementClone(TextPointer start, TextPointer end, TextElement element) 31TextElement newElement = (TextElement)Activator.CreateInstance(element.GetType()); 420TextElement parent = (TextElement)start.Parent; 524TextElement element = (TextElement)position.Parent; 531TextElement newElement; 1204private static void SetPropertyValue(TextElement element, DependencyProperty property, object currentValue, object newValue) 1288TextElement commonAncestor = position.Parent as TextElement; 1443TextElement parent = (TextElement)startPosition.Parent; 1715private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, TextElement limitingAncestor) 1746private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, bool preserveStructuralFormatting, TextElement limitingAncestor) 1884Invariant.Assert(formattingProperty == TextElement.FontSizeProperty, "Only FontSize can be incremented/decremented among character properties"); 1963ApplyStructuralInlinePropertyAcrossInline(start, end, (TextElement)commonAncestor, formattingProperty, value); 2049TextElement limit = (TextElement)conflictingParent.Parent; 2146start = SplitFormattingElements(start, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement); 2147end = SplitFormattingElements(end, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement); 2157private static void ApplyStructuralInlinePropertyAcrossInline(TextPointer start, TextPointer end, TextElement commonAncestor, DependencyProperty formattingProperty, object value)
System\Windows\Documents\TextRangeEditLists.cs (7)
78TextElement parentBlock = (TextElement)secondParagraphOrBlockUIContainer.Parent; 100TextElement previousBlock = secondParagraphOrBlockUIContainer.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as TextElement; 470TextElement parent = (TextElement)lastListItem.Parent; 475parent = (TextElement)parent.Parent;
System\Windows\Documents\TextRangeEditTables.cs (19)
110TextElement element = position.Parent as TextElement; 113element = element.Parent as TextElement; 122TextElement element = position.Parent as TextElement; 125element = element.Parent as TextElement; 134TextElement element = position.Parent as TextElement; 137element = element.Parent as TextElement; 631TextElement ancestor = insertionPosition.Parent as TextElement; 642ancestor = ancestor.Parent as TextElement; 2152TextElement commonAncestor = anchorPosition.Parent as TextElement; 2155commonAncestor = commonAncestor.Parent as TextElement; 2169TextElement commonAncestor, 2181TextElement element = position.Parent as TextElement; 2213element = element.Parent as TextElement;
System\Windows\Documents\TextRangeSerialization.cs (19)
137internal static void PasteXml(TextRange range, TextElement fragment) 218TextElement nextElement = (TextElement)textReader.GetAdjacentElement(LogicalDirection.Forward); 356Invariant.Assert(typeof(TextElement).IsAssignableFrom(pointer.ParentType), "pointer must be still in a scope of TextElement"); 425Invariant.Assert(typeof(TextElement).IsAssignableFrom(thisElement.ParentType), "thisElement is expected to be a TextElement"); 861if (property == Inline.BaselineAlignmentProperty || property == TextElement.TextEffectsProperty) 1222private static bool PasteSingleEmbeddedElement(TextRange range, TextElement fragment) 1226TextElement uiContainer = fragment.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 1255private static void PasteTextFragment(TextElement fragment, TextRange range) 1277private static void PasteNonMergeableTextFragment(TextElement fragment, TextRange range) 1294private static void PasteMergeableTextFragment(TextElement fragment, TextRange range, TextPointer insertionPosition) 1534private static void AdjustFragmentForTargetRange(TextElement fragment, TextRange range) 1555private static void ApplyContextualProperties(TextPointer start, TextPointer end, TextElement propertyBag) 1613TextElement element = (TextElement)start.Parent; 1677while (typeof(TextElement).IsAssignableFrom(runningEnd.ParentType) && !runningEnd.HasEqualScope(commonAncestor)) 1696if (typeof(TextElement).IsAssignableFrom(commonAncestor.ParentType)) 1736while (typeof(TextElement).IsAssignableFrom(navigator.ParentType))
System\Windows\Documents\TextSchema.cs (37)
47TextElement.FontFamilyProperty, 48TextElement.FontStyleProperty, 49TextElement.FontWeightProperty, 50TextElement.FontStretchProperty, 51TextElement.FontSizeProperty, 52TextElement.ForegroundProperty, 101internal static bool ValidateChild(TextElement parent, TextElement child, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 120internal static bool IsValidChild(TextElement parent, Type childType) 125internal static bool ValidateChild(TextElement parent, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent) 162TextElement leftElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward); 163TextElement rightElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 168if (parent is TextElement) 170return ValidateChild((TextElement)parent, childType, throwIfIllegalChild, throwIfIllegalHyperlinkDescendent); 219if (typeof(TextElement).IsAssignableFrom(position.ParentType) && 234Invariant.Assert(!typeof(TextElement).IsAssignableFrom(parentType)); 239internal static bool HasHyperlinkAncestor(TextElement element) 270return elementType.Module == typeof(System.Windows.Documents.TextElement).Module || // presentationframework 466Invariant.Assert(typeof(TextElement).IsAssignableFrom(type) || typeof(TableColumn).IsAssignableFrom(type), 881private static bool HasIllegalHyperlinkDescendant(TextElement element, bool throwIfIllegalDescendent) 891TextElement nextElement = (TextElement)start.GetAdjacentElement(LogicalDirection.Forward); 919string string1 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush1); 920string string2 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush2); 959TextElement.BackgroundProperty, 973TextElement.BackgroundProperty, 994TextElement.BackgroundProperty, 1012TextElement.BackgroundProperty, 1026TextElement.BackgroundProperty, 1042TextElement.BackgroundProperty, 1057TextElement.BackgroundProperty, 1065TextElement.BackgroundProperty, 1081TextElement.BackgroundProperty, 1098TextElement.BackgroundProperty, 1121TextElement.BackgroundProperty, 1138TextElement.BackgroundProperty, 1145TextElement.BackgroundProperty,
System\windows\Documents\TextSelection.cs (8)
1338internal override void SetXmlVirtual(TextElement fragment) 1503noninheritableProperties[i] != TextElement.TextEffectsProperty && 1511element = ((TextElement)element).Parent; 1645backgroundPropertyValue = ((TextSelection)focusedTextSelection).GetCurrentValue(TextElement.BackgroundProperty); 2044fontStylePropertyValue = ((TextSelection)textSelection).GetCurrentValue(TextElement.FontStyleProperty); 2134object fontStylePropertyValue = GetPropertyValue(TextElement.FontStyleProperty); 2231double fontSize = (double)currentTextSelection.GetPropertyValue(TextElement.FontSizeProperty); 2232FontFamily fontFamily = (FontFamily)currentTextSelection.GetPropertyValue(TextElement.FontFamilyProperty);
System\Windows\Documents\TextServicesDisplayAttribute.cs (1)
99return ((SolidColorBrush)position.GetValue(TextElement.ForegroundProperty)).Color;
System\Windows\Documents\TextStore.cs (14)
429TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward); 848(double)UiScope.GetValue(TextElement.FontSizeProperty), 849(FontFamily)UiScope.GetValue(TextElement.FontFamilyProperty), 868(double)position.GetValue(TextElement.FontSizeProperty), 869(FontFamily)position.GetValue(TextElement.FontFamilyProperty), 1255TextElement startElement = (TextElement)((TextPointer)start).Parent; 1256TextElement endElement = (TextElement)((TextPointer)end).Parent; 1257TextElement commonAncestor = TextElement.GetCommonAncestor(startElement, endElement); 3466TextElement element = start.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
419TextElement element; 422element = (TextElement)Activator.CreateInstance(_elementType);
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
55TextElement element; 63element = (TextElement)Activator.CreateInstance(_type);
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (1)
50TextElement element;
System\Windows\Documents\TextTreeTextElementNode.cs (2)
308internal TextElement TextElement 386private TextElement _textElement;
System\Windows\Documents\TextTreeUndo.cs (1)
53internal static void CreatePropertyUndoUnit(TextElement element, DependencyPropertyChangedEventArgs e)
System\Windows\Documents\ValidationHelper.cs (2)
112if (child is TextElement) 114if (((TextElement)child).Parent != null)
System\Windows\FrameworkElement.cs (12)
2397TextElement.FontFamilyProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontFamily, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontFamily))); 2398TextElement.FontSizeProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.ThemeMessageFontSize, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontSize))); 2399TextElement.FontStyleProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontStyle, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontStyle))); 2400TextElement.FontWeightProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontWeight, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontWeight))); 5548if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontFamilyProperty)) 5559if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontSizeProperty)) 5570if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontStyleProperty)) 5581if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontWeightProperty)) 5614CoerceValue(TextElement.FontFamilyProperty); 5615CoerceValue(TextElement.FontSizeProperty); 5616CoerceValue(TextElement.FontStyleProperty); 5617CoerceValue(TextElement.FontWeightProperty);
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
742case 648: t = () => typeof(TextElement); break;
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (21)
3821Type type = typeof(System.Windows.Documents.TextElement); 3822DependencyProperty dp = System.Windows.Documents.TextElement.BackgroundProperty; 3824this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3840Type type = typeof(System.Windows.Documents.TextElement); 3841DependencyProperty dp = System.Windows.Documents.TextElement.FontFamilyProperty; 3843this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3859Type type = typeof(System.Windows.Documents.TextElement); 3860DependencyProperty dp = System.Windows.Documents.TextElement.FontSizeProperty; 3862this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3878Type type = typeof(System.Windows.Documents.TextElement); 3879DependencyProperty dp = System.Windows.Documents.TextElement.FontStretchProperty; 3881this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3897Type type = typeof(System.Windows.Documents.TextElement); 3898DependencyProperty dp = System.Windows.Documents.TextElement.FontStyleProperty; 3900this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3916Type type = typeof(System.Windows.Documents.TextElement); 3917DependencyProperty dp = System.Windows.Documents.TextElement.FontWeightProperty; 3919this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType 3935Type type = typeof(System.Windows.Documents.TextElement); 3936DependencyProperty dp = System.Windows.Documents.TextElement.ForegroundProperty; 3938this.GetXamlType(typeof(System.Windows.Documents.TextElement)), // DeclaringType
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
11164typeof(System.Windows.Documents.TextElement),
System\Windows\Markup\KnownTypes.cs (8)
1910return System.Windows.Documents.TextElement.BackgroundProperty; 1912return System.Windows.Documents.TextElement.FontFamilyProperty; 1914return System.Windows.Documents.TextElement.FontSizeProperty; 1916return System.Windows.Documents.TextElement.FontStretchProperty; 1918return System.Windows.Documents.TextElement.FontStyleProperty; 1920return System.Windows.Documents.TextElement.FontWeightProperty; 1922return System.Windows.Documents.TextElement.ForegroundProperty; 6196case KnownElements.TextElement: t = typeof(System.Windows.Documents.TextElement); break;
System\Windows\SystemResources.cs (4)
1255fe.CoerceValue(TextElement.FontFamilyProperty); 1256fe.CoerceValue(TextElement.FontSizeProperty); 1257fe.CoerceValue(TextElement.FontStyleProperty); 1258fe.CoerceValue(TextElement.FontWeightProperty);
System.Windows.Controls.Ribbon (4)
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (2)
850TextElement textElement; 865else if ((textElement = d as TextElement) != null)
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (2)
586ribbonGroup._headerContentPresenter.SetValue(TextElement.ForegroundProperty, e.NewValue); 590ribbonGroup._headerContentPresenter.ClearValue(TextElement.ForegroundProperty);