public override void Merge(PdfElementStyle style) { PdfPanelStyle panelStyle = style as PdfPanelStyle; base.Merge(panelStyle); if (panelStyle.HorizontalAlignment.HasValue) { HorizontalAlignment = panelStyle.HorizontalAlignment; } if (panelStyle.BackgroundColor.HasValue) { BackgroundColor = panelStyle.BackgroundColor; } if (panelStyle.BorderColor.HasValue) { BorderColor = panelStyle.BorderColor; } if (panelStyle.Padding.HasValue) { Padding = panelStyle.Padding; } if (panelStyle.Leading.HasValue) { Leading = panelStyle.Leading; } if (panelStyle.BorderWidth.HasValue) { BorderWidth = panelStyle.BorderWidth; } if (panelStyle.TopIndent.HasValue) { TopIndent = panelStyle.TopIndent; } if (panelStyle.BottomIndent.HasValue) { BottomIndent = panelStyle.BottomIndent; } if (panelStyle.Width.HasValue && !panelStyle.Width.Value.IsBlank) { Width = panelStyle.Width; } }
public override void Merge(PdfElementStyle style) { ChunkStyle chunkStyle = style as ChunkStyle; base.Merge(chunkStyle); Font.Merge(chunkStyle.Font); }
public static XElement GenerateXElement(PdfElementStyle style, XNamespace xmlNamespace = null) { XNamespace xmlns = xmlNamespace ?? XNamespace.None; if (style is TableStyle) { return style.GenerateXElement(xmlns + PdfElementKind.Table.DisplayName()); } else if (style is TableCellStyle) { return style.GenerateXElement(xmlns + PdfElementKind.TableCell.DisplayName()); } else if (style is ParagraphStyle) { return style.GenerateXElement(xmlns + PdfElementKind.Paragraph.DisplayName()); } else if (style is PhraseStyle) { return style.GenerateXElement(xmlns + PdfElementKind.Phrase.DisplayName()); } else if (style is ChunkStyle) { return style.GenerateXElement(xmlns + PdfElementKind.Chunk.DisplayName()); } else if (style is HeaderStyle) { return ((HeaderStyle) style).GenerateXElement(xmlns); } else if (style is PdfImageStyle) { return style.GenerateXElement(xmlns + PdfElementKind.Image.DisplayName()); } else if (style is PdfPanelStyle) { return style.GenerateXElement(xmlns + PdfElementKind.Panel.DisplayName()); } else if (style is SignaturePanelStyle) { return style.GenerateXElement(xmlns + PdfElementKind.Signature.DisplayName()); } else if (style is SeparatorStyle) { return style.GenerateXElement(xmlns + PdfElementKind.Separator.DisplayName()); } else { throw new NotSupportedException(String.Format("'{0}' Type Not Supported.", style.GetType().Name)); } }
public override void Merge(PdfElementStyle style) { PdfImageStyle imageStyle = style as PdfImageStyle; base.Merge(imageStyle); if (!imageStyle.Source.IsNullOrBlank()) { Source = imageStyle.Source; } if (imageStyle.Type.HasValue) { Type = imageStyle.Type; } }
public override void Merge(PdfElementStyle style) { TableCellStyle cellStyle = style as TableCellStyle; base.Merge(cellStyle); if (cellStyle.BackgroundColor.HasValue) { BackgroundColor = cellStyle.BackgroundColor; } if (cellStyle.BorderColor.HasValue) { BorderColor = cellStyle.BorderColor; } if (cellStyle.Padding.HasValue) { Padding = cellStyle.Padding; } if (cellStyle.Leading.HasValue) { Leading = cellStyle.Leading; } if (cellStyle.BorderWidth.HasValue) { BorderWidth = cellStyle.BorderWidth; } if (cellStyle.HorizontalAlignment.HasValue) { HorizontalAlignment = cellStyle.HorizontalAlignment; } if (cellStyle.VerticalAlignment.HasValue) { VerticalAlignment = cellStyle.VerticalAlignment; } if (cellStyle.NoWrap.HasValue) { NoWrap = cellStyle.NoWrap; } }
public override void Merge(PdfElementStyle style) { ParagraphStyle paragraphStyle = style as ParagraphStyle; base.Merge(paragraphStyle); Font.Merge(paragraphStyle.Font); }
public override void Merge(PdfElementStyle style) { TableStyle tableStyle = style as TableStyle; base.Merge(tableStyle); if (tableStyle.HorizontalAlignment.HasValue) { HorizontalAlignment = tableStyle.HorizontalAlignment; } if (tableStyle.SpacingBefore.HasValue) { SpacingBefore = tableStyle.SpacingBefore; } if (tableStyle.SpacingAfter.HasValue) { SpacingAfter = tableStyle.SpacingAfter; } if (tableStyle.LockedWidth.HasValue) { LockedWidth = tableStyle.LockedWidth; } if (tableStyle.Widths != null && tableStyle.Widths.Any()) { Widths = tableStyle.Widths; } if (tableStyle.WidthPercentage.HasValue) { WidthPercentage = tableStyle.WidthPercentage; } }
public override void Merge(PdfElementStyle style) { HeaderStyle headerStyle = style as HeaderStyle; base.Merge(headerStyle); Font.Merge(headerStyle.Font); }
public override void Merge(PdfElementStyle style) { SignaturePanelStyle signaturePanelStyle = style as SignaturePanelStyle; base.Merge(signaturePanelStyle); Font.Merge(signaturePanelStyle.Font); }
public override void Merge(PdfElementStyle style) { ParagraphStyle paragraphStyle = style as ParagraphStyle; base.Merge(paragraphStyle); Font.Merge(paragraphStyle.Font); if (!paragraphStyle.IndentationLeft.HasValue) { IndentationLeft = paragraphStyle.IndentationLeft; } if (paragraphStyle.IndentationRight.HasValue) { IndentationRight = paragraphStyle.IndentationRight; } if (paragraphStyle.Leading.HasValue) { Leading = paragraphStyle.Leading; } if (paragraphStyle.SpacingBefore.HasValue) { SpacingBefore = paragraphStyle.SpacingBefore; } if (paragraphStyle.SpacingAfter.HasValue) { SpacingAfter = paragraphStyle.SpacingAfter; } }