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