src\Framework\System\Windows\Controls\DataGridTextColumn.cs (15)
116DataGridHelper.SyncColumnProperty(this, e, TextElement.FontFamilyProperty, FontFamilyProperty);
117DataGridHelper.SyncColumnProperty(this, e, TextElement.FontSizeProperty, FontSizeProperty);
118DataGridHelper.SyncColumnProperty(this, e, TextElement.FontStyleProperty, FontStyleProperty);
119DataGridHelper.SyncColumnProperty(this, e, TextElement.FontWeightProperty, FontWeightProperty);
120DataGridHelper.SyncColumnProperty(this, e, TextElement.ForegroundProperty, ForegroundProperty);
136DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontFamilyProperty, FontFamilyProperty);
139DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontSizeProperty, FontSizeProperty);
142DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontStyleProperty, FontStyleProperty);
145DataGridHelper.SyncColumnProperty(this, textElement, TextElement.FontWeightProperty, FontWeightProperty);
148DataGridHelper.SyncColumnProperty(this, textElement, TextElement.ForegroundProperty, ForegroundProperty);
301TextElement.FontFamilyProperty.AddOwner(
322TextElement.FontSizeProperty.AddOwner(
345TextElement.FontStyleProperty.AddOwner(
366TextElement.FontWeightProperty.AddOwner(
387TextElement.ForegroundProperty.AddOwner(
src\Framework\System\windows\Documents\TextEditorCharacters.cs (14)
192object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontWeightProperty);
195TextEditorCharacters._OnApplyProperty(This, TextElement.FontWeightProperty, fontWeight);
212object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontStyleProperty);
215TextEditorCharacters._OnApplyProperty(This, TextElement.FontStyleProperty, fontStyle);
314double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty);
329TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize);
335TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.IncreaseByAbsoluteValue);
356double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty);
370TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize);
376TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.DecreaseByAbsoluteValue);
390TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, args.Parameter);
403TextEditorCharacters._OnApplyProperty(This, TextElement.FontFamilyProperty, args.Parameter);
416TextEditorCharacters._OnApplyProperty(This, TextElement.ForegroundProperty, args.Parameter);
429TextEditorCharacters._OnApplyProperty(This, TextElement.BackgroundProperty, args.Parameter);
src\Framework\System\Windows\Documents\TextElement.cs (33)
56typographyProperties[i].OverrideMetadata(typeof(TextElement), new FrameworkPropertyMetadata(typographyChanged));
295internal static readonly UncommonField<TextElement> ContainerTextElementField = new UncommonField<TextElement>();
468typeof(TextElement),
524typeof(TextElement),
575typeof(TextElement),
626typeof(TextElement),
677typeof(TextElement),
732typeof(TextElement),
784typeof(TextElement),
805typeof(TextElement),
848TextElement te = value as TextElement;
1156TextElement child = children.Current as TextElement;
1171internal static TextElement GetCommonAncestor(TextElement element1, TextElement element2)
1177TextElement element;
1180for (element = element1; element.Parent is TextElement; element = (TextElement)element.Parent)
1184for (element = element2; element.Parent is TextElement; element = (TextElement)element.Parent)
1193element1 = (TextElement)element1.Parent;
1199element2 = (TextElement)element2.Parent;
1206element1 = element1.Parent as TextElement;
1207element2 = element2.Parent as TextElement;
1384((TextElement) element)._typographyPropertiesGroup = null;
1464internal TextElement NextElement
1482internal TextElement PreviousElement
1500internal TextElement FirstChildElement
1518internal TextElement LastChildElement
1584private void Append(TextElement element)
src\Framework\System\Windows\Documents\TextRangeEdit.cs (23)
33internal static TextElement InsertElementClone(TextPointer start, TextPointer end, TextElement element)
35TextElement newElement = (TextElement)Activator.CreateInstance(element.GetType());
424TextElement parent = (TextElement)start.Parent;
528TextElement element = (TextElement)position.Parent;
535TextElement newElement;
1208private static void SetPropertyValue(TextElement element, DependencyProperty property, object currentValue, object newValue)
1292TextElement commonAncestor = position.Parent as TextElement;
1447TextElement parent = (TextElement)startPosition.Parent;
1719private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, TextElement limitingAncestor)
1750private static TextPointer SplitFormattingElements(TextPointer splitPosition, bool keepEmptyFormatting, bool preserveStructuralFormatting, TextElement limitingAncestor)
1888Invariant.Assert(formattingProperty == TextElement.FontSizeProperty, "Only FontSize can be incremented/decremented among character properties");
1967ApplyStructuralInlinePropertyAcrossInline(start, end, (TextElement)commonAncestor, formattingProperty, value);
2053TextElement limit = (TextElement)conflictingParent.Parent;
2150start = SplitFormattingElements(start, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement);
2151end = SplitFormattingElements(end, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement);
2161private static void ApplyStructuralInlinePropertyAcrossInline(TextPointer start, TextPointer end, TextElement commonAncestor, DependencyProperty formattingProperty, object value)
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (19)
145internal static void PasteXml(TextRange range, TextElement fragment)
230TextElement nextElement = (TextElement)textReader.GetAdjacentElement(LogicalDirection.Forward);
368Invariant.Assert(typeof(TextElement).IsAssignableFrom(pointer.ParentType), "pointer must be still in a scope of TextElement");
437Invariant.Assert(typeof(TextElement).IsAssignableFrom(thisElement.ParentType), "thisElement is expected to be a TextElement");
873if (property == Inline.BaselineAlignmentProperty || property == TextElement.TextEffectsProperty)
1252private static bool PasteSingleEmbeddedElement(TextRange range, TextElement fragment)
1256TextElement uiContainer = fragment.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
1285private static void PasteTextFragment(TextElement fragment, TextRange range)
1307private static void PasteNonMergeableTextFragment(TextElement fragment, TextRange range)
1324private static void PasteMergeableTextFragment(TextElement fragment, TextRange range, TextPointer insertionPosition)
1560private static void AdjustFragmentForTargetRange(TextElement fragment, TextRange range)
1581private static void ApplyContextualProperties(TextPointer start, TextPointer end, TextElement propertyBag)
1639TextElement element = (TextElement)start.Parent;
1703while (typeof(TextElement).IsAssignableFrom(runningEnd.ParentType) && !runningEnd.HasEqualScope(commonAncestor))
1722if (typeof(TextElement).IsAssignableFrom(commonAncestor.ParentType))
1762while (typeof(TextElement).IsAssignableFrom(navigator.ParentType))
src\Framework\System\Windows\Documents\TextSchema.cs (37)
50TextElement.FontFamilyProperty,
51TextElement.FontStyleProperty,
52TextElement.FontWeightProperty,
53TextElement.FontStretchProperty,
54TextElement.FontSizeProperty,
55TextElement.ForegroundProperty,
104internal static bool ValidateChild(TextElement parent, TextElement child, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent)
123internal static bool IsValidChild(TextElement parent, Type childType)
128internal static bool ValidateChild(TextElement parent, Type childType, bool throwIfIllegalChild, bool throwIfIllegalHyperlinkDescendent)
165TextElement leftElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward);
166TextElement rightElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
171if (parent is TextElement)
173return ValidateChild((TextElement)parent, childType, throwIfIllegalChild, throwIfIllegalHyperlinkDescendent);
222if (typeof(TextElement).IsAssignableFrom(position.ParentType) &&
237Invariant.Assert(!typeof(TextElement).IsAssignableFrom(parentType));
242internal static bool HasHyperlinkAncestor(TextElement element)
273return elementType.Module == typeof(System.Windows.Documents.TextElement).Module || // presentationframework
469Invariant.Assert(typeof(TextElement).IsAssignableFrom(type) || typeof(TableColumn).IsAssignableFrom(type),
889private static bool HasIllegalHyperlinkDescendant(TextElement element, bool throwIfIllegalDescendent)
899TextElement nextElement = (TextElement)start.GetAdjacentElement(LogicalDirection.Forward);
927string string1 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush1);
928string string2 = DPTypeDescriptorContext.GetStringValue(TextElement.BackgroundProperty, brush2);
967TextElement.BackgroundProperty,
981TextElement.BackgroundProperty,
1002TextElement.BackgroundProperty,
1020TextElement.BackgroundProperty,
1034TextElement.BackgroundProperty,
1050TextElement.BackgroundProperty,
1065TextElement.BackgroundProperty,
1073TextElement.BackgroundProperty,
1089TextElement.BackgroundProperty,
1106TextElement.BackgroundProperty,
1129TextElement.BackgroundProperty,
1146TextElement.BackgroundProperty,
1153TextElement.BackgroundProperty,
src\Framework\System\Windows\FrameworkElement.cs (12)
2410TextElement.FontFamilyProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontFamily, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontFamily)));
2411TextElement.FontSizeProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontSize, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontSize)));
2412TextElement.FontStyleProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontStyle, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontStyle)));
2413TextElement.FontWeightProperty.OverrideMetadata(_typeofThis, new FrameworkPropertyMetadata(SystemFonts.MessageFontWeight, FrameworkPropertyMetadataOptions.Inherits, null, new CoerceValueCallback(CoerceFontWeight)));
5552if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontFamilyProperty))
5563if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontSizeProperty))
5574if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontStyleProperty))
5585if (ShouldUseSystemFont((FrameworkElement)o, TextElement.FontWeightProperty))
5618CoerceValue(TextElement.FontFamilyProperty);
5619CoerceValue(TextElement.FontSizeProperty);
5620CoerceValue(TextElement.FontStyleProperty);
5621CoerceValue(TextElement.FontWeightProperty);