Svg2Xaml.SvgDrawableContainerBaseElement.SvgDrawableContainerBaseElement C# (CSharp) Method

SvgDrawableContainerBaseElement() public method

public SvgDrawableContainerBaseElement ( SvgDocument document, SvgBaseElement parent, System.Xml.Linq.XElement drawableContainerElement ) : System
document SvgDocument
parent SvgBaseElement
drawableContainerElement System.Xml.Linq.XElement
return System
        public SvgDrawableContainerBaseElement(SvgDocument document, SvgBaseElement parent, XElement drawableContainerElement)
            : base(document, parent, drawableContainerElement)
        {
            XAttribute viewBox_attribute = drawableContainerElement.Attribute("viewBox");
              if (viewBox_attribute != null)
              this.ViewBox = SvgViewbox.Parse(viewBox_attribute.Value);

              XAttribute opacity_attribute = drawableContainerElement.Attribute("opacity");
              if(opacity_attribute != null)
            Opacity = SvgLength.Parse(opacity_attribute.Value);

              XAttribute transform_attribute = drawableContainerElement.Attribute("transform");
              if(transform_attribute != null)
            Transform = SvgTransform.Parse(transform_attribute.Value);

              XAttribute clip_attribute = drawableContainerElement.Attribute("clip-path");
              if(clip_attribute != null)
            ClipPath = SvgURL.Parse(clip_attribute.Value);

              XAttribute filter_attribute = drawableContainerElement.Attribute("filter");
              if(filter_attribute != null)
            Filter = SvgURL.Parse(filter_attribute.Value);

              XAttribute mask_attribute = drawableContainerElement.Attribute("mask");
              if(mask_attribute != null)
            Mask = SvgURL.Parse(mask_attribute.Value);

              XAttribute display_attribute = drawableContainerElement.Attribute("display");
              if(display_attribute != null)
            switch(display_attribute.Value)
            {
              case "inline":
            Display = SvgDisplay.Inline;
            break;

              case "block":
            Display = SvgDisplay.Block;
            break;

              case "list-item":
            Display = SvgDisplay.ListItem;
            break;

              case "run-in":
            Display = SvgDisplay.RunIn;
            break;

              case "compact":
            Display = SvgDisplay.Compact;
            break;

              case "marker":
            Display = SvgDisplay.Marker;
            break;

              case "table":
            Display = SvgDisplay.Table;
            break;

              case "inline-table":
            Display = SvgDisplay.InlineTable;
            break;

              case "table-row-group":
            Display = SvgDisplay.TableRowGroup;
            break;

              case "table-header-group":
            Display = SvgDisplay.TableHeaderGroup;
            break;

              case "table-footer-group":
            Display = SvgDisplay.TableFooterGroup;
            break;

              case "table-row":
            Display = SvgDisplay.TableRow;
            break;

              case "table-column-group":
            Display = SvgDisplay.TableColumnGroup;
            break;

              case "table-column":
            Display = SvgDisplay.TableColumn;
            break;

              case "table-cell":
            Display = SvgDisplay.TableCell;
            break;

              case "table-caption":
            Display = SvgDisplay.TableCaption;
            break;

              case "none":
            Display = SvgDisplay.None;
            break;

              default:
            throw new NotImplementedException();
            }
        }