///
[Browsable(false),
DefaultValue(null),
Description(
"The content to be shown below search results at bottom of control."),
PersistenceMode(PersistenceMode.InnerProperty),
TemplateContainer(typeof(ResultItem))
]
public ITemplate FooterTemplate
{
get
{
return footerTemplate;
}
set
{
footerTemplate = value;
}
}
#endregion
636 CHAPTER 12 ?– B U ILDING A COMPLEX CONTROL
#region Events and Event Handling
public event EventHandler
LiveSearchSearched;
///
/// Protected method for invoking LiveSearchSearched
/// event from within Result control
///
/// Event arguments including search results
protected virtual void OnLiveSearchSearched(LiveSearchSearchedEventArgs e)
{
EventHandler evnt = LiveSearchSearched;
if (evnt != null)
evnt(this, e);
}
public event EventHandler ItemCreated;
///
/// Protected method for invoking ItemCreated event from within Result control
///
/// Event arguments
protected virtual void OnItemCreated(ResultItemEventArgs e)
{
EventHandler evnt = ItemCreated;
if (evnt != null)
evnt(this, e);
}
public event EventHandler ItemDataBound;
///
/// Protected method for invoking ItemDataBound event
/// from within Result control
///
/// Event arguments
protected virtual void OnItemDataBound(ResultItemEventArgs e)
{
EventHandler evnt = ItemDataBound;
if (evnt != null)
evnt(this, e);
}
///
/// Handles bubbled up events from child controls to catch paging events
/// from Pager control
///
/// Control which is source of event
/// Event arguments
///
CHAPTER 12 ?– BUILDING A COMPLEX CONTROL 637
protected override bool OnBubbleEvent(object source, EventArgs args)
{
// Handle events raised by children by overriding OnBubbleEvent.
Pages:
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826