Exemplo n.º 1
0
        public __Button()
        {
            // shadow element?
            this.HTMLTarget = new IHTMLDiv
            {

                // name: "CSSButton"
                // it works, yet does not apply css
                name = "CSSButton"
                //className = "CSSButton"
            };

            //this.HTMLTarget.setAttribute("name", "CSSButton");

            //this.HTMLTarget.setAttribute("style-id", x);
            //this.

            this.HTMLTarget.style.display = DOM.IStyle.DisplayEnum.inline_block;

            this.InternalButton = new IHTMLButton().AttachTo(this.HTMLTarget);
            this.InternalButton.style.padding = "0";

            this.InternalButton.style.position = DOM.IStyle.PositionEnum.absolute;
            this.InternalButton.style.left = "0";
            this.InternalButton.style.top = "0";

            // button is special like iframe??
            // width: 40px;
            this.InternalButton.style.width = "100%";
            this.InternalButton.style.height = "100%";


            this.InternalButton.style.font = DefaultFont.ToCssString();


            var FlatAppearance = new __FlatButtonAppearance();
            FlatAppearance.InternalBorderColorChanged +=
                delegate
                {
                    var a = this.FlatAppearance;
                    var BorderColor = a.BorderColor;

                    this.InternalButton.style.borderBottomColor = BorderColor.ToString();
                    this.InternalButton.style.borderStyle = "solid";
                    this.InternalButton.style.borderWidth = "1px";
                };
            this.FlatAppearance = (FlatButtonAppearance)(object)FlatAppearance;

        }
Exemplo n.º 2
0
        public __Button()
        {
            // shadow element?
            this.HTMLTarget = new IHTMLDiv
            {
                // name: "CSSButton"
                // it works, yet does not apply css
                name = "CSSButton"
                       //className = "CSSButton"
            };

            //this.HTMLTarget.setAttribute("name", "CSSButton");

            //this.HTMLTarget.setAttribute("style-id", x);
            //this.

            this.HTMLTarget.style.display = DOM.IStyle.DisplayEnum.inline_block;

            this.InternalButton = new IHTMLButton().AttachTo(this.HTMLTarget);
            this.InternalButton.style.padding = "0";

            this.InternalButton.style.position = DOM.IStyle.PositionEnum.absolute;
            this.InternalButton.style.left     = "0";
            this.InternalButton.style.top      = "0";

            // button is special like iframe??
            // width: 40px;
            this.InternalButton.style.width  = "100%";
            this.InternalButton.style.height = "100%";


            this.InternalButton.style.font = DefaultFont.ToCssString();


            var FlatAppearance = new __FlatButtonAppearance();

            FlatAppearance.InternalBorderColorChanged +=
                delegate
            {
                var a           = this.FlatAppearance;
                var BorderColor = a.BorderColor;

                this.InternalButton.style.borderBottomColor = BorderColor.ToString();
                this.InternalButton.style.borderStyle       = "solid";
                this.InternalButton.style.borderWidth       = "1px";
            };
            this.FlatAppearance = (FlatButtonAppearance)(object)FlatAppearance;
        }