Exemple #1
0
 protected override void RenderAttributes(XElement element, FoRenderOptions options)
 {
     if (RegionName.HasValue())
     {
         element.Add(new XAttribute("region-name", RegionName));
     }
     if (BackgroundRepeat.HasValue())
     {
         element.Add(new XAttribute("background-repeat", BackgroundRepeat));
     }
     if (BackgroundImage.HasValue())
     {
         element.Add(new XAttribute("background-image", "url(" + BackgroundImage + ")"));
     }
     if (ColumnCount > 0)
     {
         element.Add(new XAttribute("column-count", ColumnCount));
     }
     if (ColumnGap.HasValue())
     {
         element.Add(new XAttribute("column-gap", ColumnGap));
     }
     if (Extent.HasValue())
     {
         element.Add(new XAttribute("extent", Extent));
     }
     if (Margin.HasValue())
     {
         element.Add(new XAttribute("margin", Margin));
     }
     if (MarginTop.HasValue())
     {
         element.Add(new XAttribute("margin-top", MarginTop));
     }
     if (MarginRight.HasValue())
     {
         element.Add(new XAttribute("margin-right", MarginRight));
     }
     if (MarginBottom.HasValue())
     {
         element.Add(new XAttribute("margin-bottom", MarginBottom));
     }
     if (MarginLeft.HasValue())
     {
         element.Add(new XAttribute("margin-left", MarginLeft));
     }
 }
Exemple #2
0
        protected override void RenderAttributes(XElement element, FoRenderOptions options)
        {
            base.RenderAttributes(element, options);

            if (MasterName.IsNullOrWhiteSpace())
            {
                throw new PropertyNotSetException(nameof(MasterName));
            }
            element.Add(new XAttribute("master-name", MasterName));

            if (PageWidth.HasValue())
            {
                element.Add(new XAttribute("page-width", PageWidth));
            }
            if (PageHeight.HasValue())
            {
                element.Add(new XAttribute("page-height", PageHeight));
            }
            if (Margin.HasValue())
            {
                element.Add(new XAttribute("margin", Margin));
            }
            if (MarginTop.HasValue())
            {
                element.Add(new XAttribute("margin-top", MarginTop));
            }
            if (MarginRight.HasValue())
            {
                element.Add(new XAttribute("margin-right", MarginRight));
            }
            if (MarginBottom.HasValue())
            {
                element.Add(new XAttribute("margin-bottom", MarginBottom));
            }
            if (MarginLeft.HasValue())
            {
                element.Add(new XAttribute("margin-left", MarginLeft));
            }
        }
Exemple #3
0
 protected override void RenderAttributes(XElement element, FoRenderOptions options)
 {
     base.RenderAttributes(element, options);
     if (Margin.HasValue())
     {
         element.Add(new XAttribute("margin", Margin));
     }
     if (MarginTop.HasValue())
     {
         element.Add(new XAttribute("margin-top", MarginTop));
     }
     if (MarginRight.HasValue())
     {
         element.Add(new XAttribute("margin-right", MarginRight));
     }
     if (MarginBottom.HasValue())
     {
         element.Add(new XAttribute("margin-bottom", MarginBottom));
     }
     if (MarginLeft.HasValue())
     {
         element.Add(new XAttribute("margin-left", MarginLeft));
     }
 }
Exemple #4
0
        protected override void RenderAttributes(XElement element, FoRenderOptions options)
        {
            if (Src.IsNullOrWhiteSpace())
            {
                throw new PropertyNotSetException(nameof(Src));
            }
            element.Add(new XAttribute("src", Src));

            if (Width.HasValue())
            {
                element.Add(new XAttribute("width", Width));
            }
            if (Height.HasValue())
            {
                element.Add(new XAttribute("height", Height));
            }
            if (ContentWidth.HasValue())
            {
                element.Add(new XAttribute("content-width", ContentWidth));
            }
            if (ContentHeight.HasValue())
            {
                element.Add(new XAttribute("content-height", ContentHeight));
            }
            if (Scaling != FoScaling.Unspecified)
            {
                element.Add(new XAttribute("scaling", ToKebabCase(Scaling)));
            }
            if (ScalingMethod != FoScalingMethod.Unspecified)
            {
                element.Add(new XAttribute("scaling-method", ToKebabCase(ScalingMethod)));
            }

            if (Margin.HasValue())
            {
                element.Add(new XAttribute("margin", Margin));
            }
            if (MarginTop.HasValue())
            {
                element.Add(new XAttribute("margin-top", MarginTop));
            }
            if (MarginRight.HasValue())
            {
                element.Add(new XAttribute("margin-right", MarginRight));
            }
            if (MarginBottom.HasValue())
            {
                element.Add(new XAttribute("margin-bottom", MarginBottom));
            }
            if (MarginLeft.HasValue())
            {
                element.Add(new XAttribute("margin-left", MarginLeft));
            }

            if (Padding.HasValue())
            {
                element.Add(new XAttribute("padding", Padding));
            }
            if (PaddingTop.HasValue())
            {
                element.Add(new XAttribute("padding-top", PaddingTop));
            }
            if (PaddingRight.HasValue())
            {
                element.Add(new XAttribute("padding-right", PaddingRight));
            }
            if (PaddingBottom.HasValue())
            {
                element.Add(new XAttribute("padding-bottom", PaddingBottom));
            }
            if (PaddingLeft.HasValue())
            {
                element.Add(new XAttribute("padding-left", PaddingLeft));
            }

            base.RenderAttributes(element, options);
        }