Initial commit

This commit is contained in:
2014-04-30 17:33:21 -04:00
commit f965f46fb3
33 changed files with 2949 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
using System.Collections.ObjectModel;
namespace Common.Wpf.HtmlLabelControl
{
public class TextLine
{
private double _height;
public double Height
{
get
{
if (_height == 0)
{
foreach (TextFragment textFragment in FragmentList)
{
if (textFragment.FormattedText.Height > _height)
_height = textFragment.FormattedText.Height;
}
}
return _height;
}
}
private double _width;
public double Width
{
get
{
if (_width == 0)
{
foreach (TextFragment textFragment in FragmentList)
{
_width += textFragment.FormattedText.Width;
}
}
return _width;
}
}
public Collection<TextFragment> FragmentList { get; private set; }
public TextLine()
{
FragmentList = new Collection<TextFragment>();
}
}
}