private void Initialize(RtfTableCellStyle style) { _definition = new RtfTableCellDefinition(this); _definition.Style = style; IsPartOfATable = true; IsFormattingIncluded = style != null && style.DefaultParagraphFormatting != null; }
/// <summary> /// Copies all properties of the current cell style to the specified RtfTableCellStyle object. /// </summary> /// <param name="cellStyle">Cell style object to copy to.</param> public void CopyTo(RtfTableCellStyle cellStyle) { cellStyle._verticalAlign = this._verticalAlign; this._borders.Top.CopyTo(cellStyle._borders.Top); this._borders.Left.CopyTo(cellStyle._borders.Left); this._borders.Bottom.CopyTo(cellStyle._borders.Bottom); this._borders.Right.CopyTo(cellStyle._borders.Right); cellStyle._textFlow = this._textFlow; }
/// <summary> /// Initializes a new instance of ESCommon.Rtf.RtfTableCell class. /// </summary> /// <param name="width">Cell width in centimeters.</param> /// <param name="text">Text displayed in the cell.</param> /// <param name="style">Style applied to the cell.</param> public RtfTableCell(float width, RtfParagraphContentBase text, RtfTableCellStyle style) : base(text, style.DefaultParagraphFormatting) { Initialize(style); _definition.Width = TwipConverter.ToTwip(width, MetricUnit.Centimeter); }
/// <summary> /// Initializes a new instance of ESCommon.Rtf.RtfTableCell class. /// </summary> /// <param name="text">Text displayed in the cell.</param> /// <param name="style">Style applied to the cell.</param> public RtfTableCell(RtfParagraphContentBase text, RtfTableCellStyle style) : base(text, style.DefaultParagraphFormatting) { Initialize(style); }
/// <summary> /// Initializes a new instance of ESCommon.Rtf.RtfTableCell class. /// </summary> /// <param name="text">Text displayed in the cell.</param> /// <param name="style">Style applied to the cell.</param> public RtfTableCell(string text, RtfTableCellStyle style) : base(text, style.DefaultParagraphFormatting) { Initialize(style); }
internal RtfTableCellDefinition(RtfTableCell cell, RtfTableCellStyle style) { _cell = cell; _style = style; }