예제 #1
0
        public void Behave(LayoutedElement element)
        {
            if (element.ForcedInnerHeight.IsDefined)
                return;

            element.ForcedInnerHeight = Unit.Max(CalculateHeight(element), element.Children.OuterHeight);
        }
예제 #2
0
 protected override Unit CalculateHeight(LayoutedElement element)
 {
     return specification.Font.CalculateTextHeight(specification.TextContent, element.ForcedInnerWidth);
 }
예제 #3
0
 protected abstract Unit CalculateHeight(LayoutedElement element);
 protected override Unit CalculateHeight(LayoutedElement element)
 {
     return specification.Source.Height*(element.ForcedInnerWidth/specification.Source.Width);
 }