Beispiel #1
0
 // Token: 0x060068B9 RID: 26809 RVA: 0x001D8E68 File Offset: 0x001D7068
 internal static MbpInfo FromElement(DependencyObject o, double pixelsPerDip)
 {
     if (o is Block || o is AnchoredBlock || o is TableCell || o is ListItem)
     {
         MbpInfo mbpInfo         = new MbpInfo((TextElement)o);
         double  lineHeightValue = DynamicPropertyReader.GetLineHeightValue(o);
         if (mbpInfo.IsMarginAuto)
         {
             MbpInfo.ResolveAutoMargin(mbpInfo, o, lineHeightValue);
         }
         if (mbpInfo.IsPaddingAuto)
         {
             MbpInfo.ResolveAutoPadding(mbpInfo, o, lineHeightValue, pixelsPerDip);
         }
         return(mbpInfo);
     }
     return(MbpInfo._empty);
 }