コード例 #1
0
        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;
        }
コード例 #2
0
        public static TableShowEmptyCells Parse(string txt)
        {
            if (string.IsNullOrEmpty(txt))
            {
                return(null);
            }

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

            var ta = new TableShowEmptyCells();

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

            return(ta);
        }