Prev | Current Page 809 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

TrackViewState();
}
return pagerStyle;
}
}
///
/// The style to be applied to the footer template.
///

[Category("Style"),
Description("The style to be applied to the footer template."),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
NotifyParentProperty(true),
PersistenceMode(PersistenceMode.InnerProperty),
]
630 CHAPTER 12 ?–  B U ILDING A COMPLEX CONTROL
public virtual Style FooterStyle
{
get
{
if (footerStyle == null)
{
footerStyle = new Style();
if (IsTrackingViewState)
((IStateManager)footerStyle).TrackViewState();
}
return footerStyle;
}
}
#endregion
#region Style and ViewState management
///
/// Manual override of ViewState save method to put in custom
/// styles for control templates
///

/// Object array to persist to ViewState
override protected object SaveViewState()
{
object baseState = base.SaveViewState();
object headerStyleState = (headerStyle != null) ?
((IStateManager)HeaderStyle).SaveViewState() : null;
object statusStyleState = (statusStyle != null) ?
((IStateManager)StatusStyle).SaveViewState() : null;
object itemStyleState = (itemStyle != null) ?
((IStateManager)ItemStyle).SaveViewState() : null;
object alternatingItemStyleState = (alternatingItemStyle != null) ?
((IStateManager)AlternatingItemStyle).


Pages:
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821