iTextSharp.text.Cell.SetVerticalAlignment C# (CSharp) Метод

SetVerticalAlignment() публичный Метод

Sets the alignment of this paragraph.
public SetVerticalAlignment ( string alignment ) : void
alignment string the new alignment as a string
Результат void
        public void SetVerticalAlignment(string alignment) {
            if (Util.EqualsIgnoreCase(alignment, ElementTags.ALIGN_MIDDLE)) {
                this.VerticalAlignment = Element.ALIGN_MIDDLE;
                return;
            }
            if (Util.EqualsIgnoreCase(alignment, ElementTags.ALIGN_BOTTOM)) {
                this.VerticalAlignment = Element.ALIGN_BOTTOM;
                return;
            }
            if (Util.EqualsIgnoreCase(alignment, ElementTags.ALIGN_BASELINE)) {
                this.VerticalAlignment = Element.ALIGN_BASELINE;
                return;
            }
            this.VerticalAlignment = Element.ALIGN_TOP;
        }

Usage Example

Пример #1
0
        public static Cell GetCell(Properties attributes)
        {
            Cell cell = new Cell();
            String value;

            cell.SetHorizontalAlignment(attributes[ElementTags.HORIZONTALALIGN]);
            cell.SetVerticalAlignment(attributes[ElementTags.VERTICALALIGN]);
            value = attributes[ElementTags.WIDTH];
            if (value != null) {
                cell.SetWidth(value);
            }
            value = attributes[ElementTags.COLSPAN];
            if (value != null) {
                cell.Colspan = int.Parse(value);
            }
            value = attributes[ElementTags.ROWSPAN];
            if (value != null) {
                cell.Rowspan = int.Parse(value);
            }
            value = attributes[ElementTags.LEADING];
            if (value != null) {
                cell.Leading = float.Parse(value, System.Globalization.NumberFormatInfo.InvariantInfo);
            }
            cell.Header = Utilities.CheckTrueOrFalse(attributes, ElementTags.HEADER);
            if (Utilities.CheckTrueOrFalse(attributes, ElementTags.NOWRAP)) {
                cell.MaxLines = 1;
            }
            SetRectangleProperties(cell, attributes);
            return cell;
        }
All Usage Examples Of iTextSharp.text.Cell::SetVerticalAlignment