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,32 @@
using System.Windows;
using System.Windows.Media;
namespace Common.Wpf.HtmlLabelControl
{
public class TextFragmentStyle
{
public Brush Color { get; set; }
public FontStyle? Style { get; set; }
public FontWeight? Weight { get; set; }
public double? Size { get; set; }
public bool? Underline { get; set; }
public void Apply(TextFragment fragment)
{
if (Color != null)
fragment.Color = Color;
if (Style.HasValue)
fragment.Style = Style.Value;
if (Weight.HasValue)
fragment.Weight = Weight.Value;
if (Size.HasValue)
fragment.Size = Size.Value;
if (Underline.HasValue)
fragment.Underline = Underline.Value;
}
}
}