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\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\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\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\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\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);