// Token: 0x060066A0 RID: 26272 RVA: 0x001CCD18 File Offset: 0x001CAF18 private void InitCommon(DependencyObject target) { this._typeface = DynamicPropertyReader.GetTypeface(target); this._fontSize = (double)target.GetValue(TextElement.FontSizeProperty); this._foreground = (Brush)target.GetValue(TextElement.ForegroundProperty); this._textEffects = DynamicPropertyReader.GetTextEffects(target); this._cultureInfo = DynamicPropertyReader.GetCultureInfo(target); this._textDecorations = DynamicPropertyReader.GetTextDecorations(target); if (this._numberSubstitution == null) { this._numberSubstitution = DynamicPropertyReader.GetNumberSubstitution(target); } }
// assigns values to all fields except for _typographyProperties, _baselineAlignment, // and _background, which are set appropriately in each constructor private void InitCommon(DependencyObject target) { _typeface = DynamicPropertyReader.GetTypeface(target); _fontSize = (double)target.GetValue(TextElement.FontSizeProperty); _foreground = (Brush)target.GetValue(TextElement.ForegroundProperty); _textEffects = DynamicPropertyReader.GetTextEffects(target); _cultureInfo = DynamicPropertyReader.GetCultureInfo(target); _textDecorations = DynamicPropertyReader.GetTextDecorations(target); // as an optimization, we may have already initialized _numberSubstitution to a default // value if none of the NumberSubstitution dependency properties have changed if (_numberSubstitution == null) { _numberSubstitution = DynamicPropertyReader.GetNumberSubstitution(target); } }