|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
namespace Mullivan.Web.UI.WebControls
{
public class JQueryAccordionSectionControlCollection : ControlCollection
{
// Methods
public JQueryAccordionSectionControlCollection(Control owner)
: base(owner)
{
}
public override void Add(Control child)
{
if (!(child is JQueryAccordionSection))
{
throw new ArgumentException("JQueryTabCollection can only contain JQueryTab controls.");
}
((JQueryAccordionSection)child).SetOwner((JQueryAccordion)this.Owner);
base.Add(child);
}
public override void AddAt(int index, Control child)
{
if (!(child is JQueryAccordionSection))
{
throw new ArgumentException("JQueryTabCollection can only contain JQueryTab controls.");
}
((JQueryAccordionSection)child).SetOwner((JQueryAccordion)this.Owner);
base.AddAt(index, child);
}
public override void Remove(Control value)
{
if(this.Contains(value))
((JQueryAccordionSection)value).SetOwner(null);
base.Remove(value);
}
public override void RemoveAt(int index)
{
JQueryAccordionSection tab = this[index];
if (tab != null)
tab.SetOwner(null);
base.RemoveAt(index);
}
// Properties
public JQueryAccordionSection this[int index]
{
get
{
return (JQueryAccordionSection)base[index];
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.