Exemplo n.º 1
0
        public static bool ToggleVisible <T>(this T e)
            where T : IHTMLElement
        {
            IStyle.DisplayEnum v = IStyle.DisplayEnum.empty;

            if (e.style.display == v)
            {
                e.Hide();

                return(false);
            }
            else
            {
                e.Show();

                return(true);
            }
        }
        public static void WhenActivated(this ISupportsActivation source, IHTMLElement element, IStyle.DisplayEnum display)
        {
            element.style.display = IStyle.DisplayEnum.none;

            source.Activated +=
                delegate
            {
                element.style.display = display;
            };

            source.Deactivated +=
                delegate
            {
                element.style.display = IStyle.DisplayEnum.none;
            };
        }