Example #1
0
        private void Initialize(RtfTableCellStyle style)
        {
            _definition       = new RtfTableCellDefinition(this);
            _definition.Style = style;

            IsPartOfATable       = true;
            IsFormattingIncluded = style != null && style.DefaultParagraphFormatting != null;
        }
Example #2
0
        /// <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;
        }
Example #3
0
        /// <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);
        }
Example #4
0
 /// <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);
 }
Example #5
0
 /// <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;
 }