/// <summary> /// Constructor. /// </summary> internal LineProperties( DependencyObject element, DependencyObject contentHost, TextProperties defaultTextProperties, MarkerProperties markerProperties, TextAlignment textAlignment) { _defaultTextProperties = defaultTextProperties; _markerProperties = (markerProperties != null) ? markerProperties.GetTextMarkerProperties(this) : null; _flowDirection = (FlowDirection)element.GetValue(Block.FlowDirectionProperty); _textAlignment = textAlignment; _lineHeight = (double)element.GetValue(Block.LineHeightProperty); _textIndent = (double)element.GetValue(Paragraph.TextIndentProperty); _lineStackingStrategy = (LineStackingStrategy)element.GetValue(Block.LineStackingStrategyProperty); _textWrapping = TextWrapping.Wrap; _textTrimming = TextTrimming.None; if (contentHost is TextBlock || contentHost is ITextBoxViewHost) { // NB: we intentially don't try to find the "PropertyOwner" of // a FlowDocument here. TextWrapping has a hard-coded // value SetValue'd when a FlowDocument is hosted by a TextBoxBase. _textWrapping = (TextWrapping)contentHost.GetValue(TextBlock.TextWrappingProperty); _textTrimming = (TextTrimming)contentHost.GetValue(TextBlock.TextTrimmingProperty); } else if (contentHost is FlowDocument) { _textWrapping = ((FlowDocument)contentHost).TextWrapping; } }
/// <summary> /// Constructor. /// </summary> internal LineProperties( DependencyObject element, DependencyObject contentHost, TextProperties defaultTextProperties, MarkerProperties markerProperties) : this(element, contentHost, defaultTextProperties, markerProperties, (TextAlignment)element.GetValue(Block.TextAlignmentProperty)) { }
// Token: 0x06006660 RID: 26208 RVA: 0x001CC120 File Offset: 0x001CA320 internal LineProperties(DependencyObject element, DependencyObject contentHost, TextProperties defaultTextProperties, MarkerProperties markerProperties, TextAlignment textAlignment) { this._defaultTextProperties = defaultTextProperties; this._markerProperties = ((markerProperties != null) ? markerProperties.GetTextMarkerProperties(this) : null); this._flowDirection = (FlowDirection)element.GetValue(Block.FlowDirectionProperty); this._textAlignment = textAlignment; this._lineHeight = (double)element.GetValue(Block.LineHeightProperty); this._textIndent = (double)element.GetValue(Paragraph.TextIndentProperty); this._lineStackingStrategy = (LineStackingStrategy)element.GetValue(Block.LineStackingStrategyProperty); this._textWrapping = TextWrapping.Wrap; this._textTrimming = TextTrimming.None; if (contentHost is TextBlock || contentHost is ITextBoxViewHost) { this._textWrapping = (TextWrapping)contentHost.GetValue(TextBlock.TextWrappingProperty); this._textTrimming = (TextTrimming)contentHost.GetValue(TextBlock.TextTrimmingProperty); return; } if (contentHost is FlowDocument) { this._textWrapping = ((FlowDocument)contentHost).TextWrapping; } }