public void PerformFilter (string text)
{
if (originalSections == null)
return;
OnSearchTextChanged (text);
var newSections = new List<Section> ();
for (int sidx = 0; sidx < originalSections.Length; sidx++){
Section newSection = null;
var section = originalSections [sidx];
Element [] elements = originalElements [sidx];
for (int eidx = 0; eidx < elements.Length; eidx++){
if (elements [eidx].Matches (text)){
if (newSection == null){
newSection = new Section (section.Header, section.Footer){
FooterView = section.FooterView,
HeaderView = section.HeaderView
};
newSections.Add (newSection);
}
newSection.Add (elements [eidx]);
}
}
}
Root.Sections = newSections;
ReloadData ();
}