System\Windows\Controls\DataGridTextColumn.cs (15)
115DataGridHelper.SyncColumnProperty(this, e, TextElement.FontFamilyProperty, FontFamilyProperty);
116DataGridHelper.SyncColumnProperty(this, e, TextElement.FontSizeProperty, FontSizeProperty);
117DataGridHelper.SyncColumnProperty(this, e, TextElement.FontStyleProperty, FontStyleProperty);
118DataGridHelper.SyncColumnProperty(this, e, TextElement.FontWeightProperty, FontWeightProperty);
119DataGridHelper.SyncColumnProperty(this, e, TextElement.ForegroundProperty, ForegroundProperty);
135DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontFamilyProperty, FontFamilyProperty);
138DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontSizeProperty, FontSizeProperty);
141DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontStyleProperty, FontStyleProperty);
144DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontWeightProperty, FontWeightProperty);
147DataGridHelper.SyncColumnProperty(this, textElement, TextElement.ForegroundProperty, ForegroundProperty);
300TextElement.FontFamilyProperty.AddOwner(
321TextElement.FontSizeProperty.AddOwner(
344TextElement.FontStyleProperty.AddOwner(
365TextElement.FontWeightProperty.AddOwner(
386TextElement.ForegroundProperty.AddOwner(
System\windows\Documents\TextEditorCharacters.cs (14)
190object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontWeightProperty);
193TextEditorCharacters._OnApplyProperty(This, TextElement.FontWeightProperty, fontWeight);
210object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontStyleProperty);
213TextEditorCharacters._OnApplyProperty(This, TextElement.FontStyleProperty, fontStyle);
312double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty);
327TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize);
333TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.IncreaseByAbsoluteValue);
354double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty);
368TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize);
374TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.DecreaseByAbsoluteValue);
388TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, args.Parameter);
401TextEditorCharacters._OnApplyProperty(This, TextElement.FontFamilyProperty, args.Parameter);
414TextEditorCharacters._OnApplyProperty(This, TextElement.ForegroundProperty, args.Parameter);
427TextEditorCharacters._OnApplyProperty(This, TextElement.BackgroundProperty, args.Parameter);
System\Windows\Documents\TextElement.cs (33)
51typographyProperties[i].OverrideMetadata(typeof(TextElement), new FrameworkPropertyMetadata(typographyChanged));
290internal static readonly UncommonField<TextElement> ContainerTextElementField = new UncommonField<TextElement>();
463typeof(TextElement),
513typeof(TextElement),
558typeof(TextElement),
603typeof(TextElement),
648typeof(TextElement),
697typeof(TextElement),
743typeof(TextElement),
764typeof(TextElement),
807TextElement te = value as TextElement;
1111TextElement child = children.Current as TextElement;
1126internal static TextElement GetCommonAncestor(TextElement element1, TextElement element2)
1132TextElement element;
1135for (element = element1; element.Parent is TextElement; element = (TextElement)element.Parent)
1139for (element = element2; element.Parent is TextElement; element = (TextElement)element.Parent)
1148element1 = (TextElement)element1.Parent;
1154element2 = (TextElement)element2.Parent;
1161element1 = element1.Parent as TextElement;
1162element2 = element2.Parent as TextElement;
1339((TextElement) element)._typographyPropertiesGroup = null;
1419internal TextElement NextElement
1437internal TextElement PreviousElement
1455internal TextElement FirstChildElement
1473internal TextElement LastChildElement
1536private void Append(TextElement element)
System\Windows\Documents\TextRangeEdit.cs (23)
31internal static TextElement InsertElementClone(TextPointer start, TextPointer end, TextElement element)
33TextElement newElement = (TextElement)Activator.CreateInstance(element.GetType());
422TextElement parent = (TextElement)start.Parent;
526TextElement element = (TextElement)position.Parent;
533TextElement newElement;
1206private static void SetPropertyValue(TextElement element, DependencyProperty property, object currentValue, object newValue)
1290TextElement commonAncestor = position.Parent as TextElement;
1445TextElement parent = (TextElement)startPosition.Parent;
1717private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, TextElement limitingAncestor)
1748private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, bool preserveStructuralFormatting, TextElement limitingAncestor)
1886Invariant.Assert(formattingProperty == TextElement.FontSizeProperty, "Only FontSize can be incremented/decremented among character properties");
1965ApplyStructuralInlinePropertyAcrossInline(start, end, (TextElement)commonAncestor, formattingProperty, value);
2051TextElement limit = (TextElement)conflictingParent.Parent;
2148start = SplitFormattingElements(start, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement);
2149end = SplitFormattingElements(end, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement);
2159private static void ApplyStructuralInlinePropertyAcrossInline(TextPointer start, TextPointer end, TextElement commonAncestor, DependencyProperty formattingProperty, object value)
System\Windows\Documents\TextRangeSerialization.cs (19)
143internal static void PasteXml(TextRange range, TextElement fragment)
224TextElement nextElement = (TextElement)textReader.GetAdjacentElement(LogicalDirection.Forward);
362Invariant.Assert(typeof(TextElement).IsAssignableFrom(pointer.ParentType), "pointer must be still in a scope of TextElement");
431Invariant.Assert(typeof(TextElement).IsAssignableFrom(thisElement.ParentType), "thisElement is expected to be a TextElement");
867if (property == Inline.BaselineAlignmentProperty || property == TextElement.TextEffectsProperty)
1228private static bool PasteSingleEmbeddedElement(TextRange range, TextElement fragment)
1232TextElement uiContainer = fragment.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
1261private static void PasteTextFragment(TextElement fragment, TextRange range)
1283private static void PasteNonMergeableTextFragment(TextElement fragment, TextRange range)
1300private static void PasteMergeableTextFragment(TextElement fragment, TextRange range, TextPointer insertionPosition)
1540private static void AdjustFragmentForTargetRange(TextElement fragment, TextRange range)
1561private static void ApplyContextualProperties(TextPointer start, TextPointer end, TextElement propertyBag)
1619TextElement element = (TextElement)start.Parent;
1683while (typeof(TextElement).IsAssignableFrom(runningEnd.ParentType) && !runningEnd.HasEqualScope(commonAncestor))
1702if (typeof(TextElement).IsAssignableFrom(commonAncestor.ParentType))
1742while (typeof(TextElement).IsAssignableFrom(navigator.ParentType))
System\Windows\Documents\TextSchema.cs (37)
48TextElement.FontFamilyProperty,
49TextElement.FontStyleProperty,
50TextElement.FontWeightProperty,
51TextElement.FontStretchProperty,
52TextElement.FontSizeProperty,
53TextElement.ForegroundProperty,
102internal static bool ValidateChild(TextElement parent, TextElement child, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent)
121internal static bool IsValidChild(TextElement parent, Type childType)
126internal static bool ValidateChild(TextElement parent, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent)
163TextElement leftElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward);
164TextElement rightElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
169if (parent is TextElement)
171return ValidateChild((TextElement)parent, childType, throwIfIllegalChild, throwIfIllegalHyperlinkDescendent);
220if (typeof(TextElement).IsAssignableFrom(position.ParentType) &&
235Invariant.Assert(!typeof(TextElement).IsAssignableFrom(parentType));
240internal static bool HasHyperlinkAncestor(TextElement element)
271return elementType.Module == typeof(System.Windows.Documents.TextElement).Module || // presentationframework
467Invariant.Assert(typeof(TextElement).IsAssignableFrom(type) || typeof(TableColumn).IsAssignableFrom(type),
887private static bool HasIllegalHyperlinkDescendant(TextElement element, bool throwIfIllegalDescendent)
897TextElement nextElement = (TextElement)start.GetAdjacentElement(LogicalDirection.Forward);
925string string1 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush1);
926string string2 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush2);
965TextElement.BackgroundProperty,
979TextElement.BackgroundProperty,
1000TextElement.BackgroundProperty,
1018TextElement.BackgroundProperty,
1032TextElement.BackgroundProperty,
1048TextElement.BackgroundProperty,
1063TextElement.BackgroundProperty,
1071TextElement.BackgroundProperty,
1087TextElement.BackgroundProperty,
1104TextElement.BackgroundProperty,
1127TextElement.BackgroundProperty,
1144TextElement.BackgroundProperty,
1151TextElement.BackgroundProperty,
System\Windows\FrameworkElement.cs (12)
2413TextElement.FontFamilyProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontFamily, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontFamily)));
2414TextElement.FontSizeProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.ThemeMessageFontSize, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontSize)));
2415TextElement.FontStyleProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontStyle, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontStyle)));
2416TextElement.FontWeightProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontWeight, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontWeight)));
5554if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontFamilyProperty))
5565if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontSizeProperty))
5576if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontStyleProperty))
5587if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontWeightProperty))
5620CoerceValue(TextElement.FontFamilyProperty);
5621CoerceValue(TextElement.FontSizeProperty);
5622CoerceValue(TextElement.FontStyleProperty);
5623CoerceValue(TextElement.FontWeightProperty);