public TextFormat GetFormat(double fontSize, Align a, Valign v) { var name = fontSize.ToString() + "|" + a.ToString() + "|" + v.ToString(); if (Formats.ContainsKey(name)) { return(Formats[name]); } if (fontSize <= 0) { fontSize = 16; } var format = new TextFormat(new SharpDX.DirectWrite.Factory(), "Calibri", (float)fontSize) { TextAlignment = a == Align.Left ? TextAlignment.Leading : a == Align.Right ? TextAlignment.Trailing : TextAlignment.Center, ParagraphAlignment = v == Valign.Top ? ParagraphAlignment.Near : v == Valign.Bottom ? ParagraphAlignment.Far : ParagraphAlignment.Center }; Formats[name] = format; return(format); }
/// <summary>Assigns all needed attributes to the tag</summary> /// <returns>This instance downcasted to base class</returns> public virtual IndexedTag attr( string id = null, string @class = null, string style = null, string title = null, LangCode lang = null, string xmllang = null, Dir? dir = null, string onclick = null, string ondblclick = null, string onmousedown = null, string onmouseup = null, string onmouseover = null, string onmousemove = null, string onmouseout = null, string onkeypress = null, string onkeydown = null, string onkeyup = null, Align? align = null, char? @char = null, Length charoff = null, Valign? valign = null ) { Id = id; Class = @class; Style = style; Title = title; Lang = lang; XmlLang = xmllang; Dir = dir; OnClick = onclick; OnDblClick = ondblclick; OnMouseDown = onmousedown; OnMouseUp = onmouseup; OnMouseOver = onmouseover; OnMouseMove = onmousemove; OnMouseOut = onmouseout; OnKeyPress = onkeypress; OnKeyDown = onkeydown; OnKeyUp = onkeyup; Align = align; Char = @char; CharOff = charoff; Valign = valign; return this; }
public override void FromTo(ShapeBase shape) { if (shape == null) { return; } base.FromTo(shape); ShapeTime other = shape as ShapeTime; if (other != null) { _displayFormat = other._displayFormat; _Align = other._Align; _Valign = other._Valign; FrameSizeFixed = other.FrameSizeFixed; FontSizeFixed = other.FontSizeFixed; } }
public override void FromTo(ShapeBase shape) { if (shape == null) { return; } base.FromTo(shape); ShapeDynamicTextBase other = shape as ShapeDynamicTextBase; if (other != null) { _Align = other._Align; //_BitCount = other._BitCount; _RollRate = other._RollRate; _RollWay = other._RollWay; _Valign = other._Valign; FrameSizeFixed = other.FrameSizeFixed; FontSizeFixed = other.FontSizeFixed; } }
public static TagTr valign(this TagTr tag, Valign value) { tag.Valign = value; return tag; }
/// <summary>Assigns all needed attributes to the tag</summary> /// <returns>This instance downcasted to base class</returns> public virtual IndexedTag attr( string abbr = null, string axis = null, string headers = null, Scope? scope = null, int? rowspan = null, int? colspan = null, string id = null, string @class = null, string style = null, string title = null, LangCode lang = null, string xmllang = null, Dir? dir = null, string onclick = null, string ondblclick = null, string onmousedown = null, string onmouseup = null, string onmouseover = null, string onmousemove = null, string onmouseout = null, string onkeypress = null, string onkeydown = null, string onkeyup = null, Align? align = null, char? @char = null, Length charoff = null, Valign? valign = null ) { Abbr = abbr; Axis = axis; Headers = headers; Scope = scope; RowSpan = rowspan; ColSpan = colspan; Id = id; Class = @class; Style = style; Title = title; Lang = lang; XmlLang = xmllang; Dir = dir; OnClick = onclick; OnDblClick = ondblclick; OnMouseDown = onmousedown; OnMouseUp = onmouseup; OnMouseOver = onmouseover; OnMouseMove = onmousemove; OnMouseOut = onmouseout; OnKeyPress = onkeypress; OnKeyDown = onkeydown; OnKeyUp = onkeyup; Align = align; Char = @char; CharOff = charoff; Valign = valign; return this; }
public static TagColGroup valign(this TagColGroup tag, Valign value) { tag.Valign = value; return tag; }
public static TagTfoot valign(this TagTfoot tag, Valign value) { tag.Valign = value; return(tag); }
public static TagTbody valign(this TagTbody tag, Valign value) { tag.Valign = value; return(tag); }
public static TagThead valign(this TagThead tag, Valign value) { tag.Valign = value; return(tag); }