// should/could the concepts be bound automatically to html pages?
		public static ApplyToggleConceptTuple ApplyToggleConcept(
			this IHTMLElement Content,
			IHTMLElement HideContent,
			IHTMLElement ShowContent
			)
		{
			var t = new ApplyToggleConceptTuple
			{
				Show = delegate
				{
					Content.Show();
					HideContent.Show();
					ShowContent.Hide();
				},

				Hide = delegate
				{
					Content.Hide();
					HideContent.Hide();
					ShowContent.Show();
				}
			};

			HideContent.onclick += eee => { eee.preventDefault(); t.Hide(); };
			ShowContent.onclick += eee => { eee.preventDefault(); t.Show(); };

			t.Show();

			return t;
		}
示例#2
0
        // should/could the concepts be bound automatically to html pages?
        public static ApplyToggleConceptTuple ApplyToggleConcept(
            this IHTMLElement Content,
            IHTMLElement HideContent,
            IHTMLElement ShowContent
            )
        {
            var t = new ApplyToggleConceptTuple
            {
                Show = delegate
                {
                    Content.Show();
                    HideContent.Show();
                    ShowContent.Hide();
                },

                Hide = delegate
                {
                    Content.Hide();
                    HideContent.Hide();
                    ShowContent.Show();
                }
            };

            HideContent.onclick += eee => { eee.PreventDefault(); t.Hide(); };
            ShowContent.onclick += eee => { eee.PreventDefault(); t.Show(); };

            t.Show();

            return(t);
        }