Exemple #1
0
        public static BorderCollapse Parse(string txt)
        {
            if (string.IsNullOrEmpty(txt))
            {
                return(null);
            }

            txt = txt.Trim().ToLower();

            var ta = new BorderCollapse();

            if (txt == "collapse")
            {
                ta.Value = Unit.collapse;
            }
            else if (txt == "separate")
            {
                ta.Value = Unit.separate;
            }
            else if (txt == "inherit")
            {
                ta.Value = Unit.inherit;
            }
            else
            {
                throw new FormatException("Unbekannter Art für BorderCollapse: " + txt);
            }

            return(ta);
        }
        public StyleBuilderTable()
        {
            TableBorderCollapse = new BorderCollapse()
            {
                Value = BorderCollapse.Unit.collapse
            };
            TableBorderSpacing = new LengthPixel()
            {
                Value = 0
            };
            TableLayout = new TableLayout()
            {
                Value = TableLayout.Unit.auto
            };
            TableShowEmptyCells = new TableShowEmptyCells()
            {
                Value = TableShowEmptyCells.Unit.show
            };

            BorderWidth = new LengthPixel()
            {
                Value = 1
            };
            BorderStyle = new BorderStyle()
            {
                Value = BorderStyle.Unit.solid
            };
            BorderColor = Color.Silver;
        }