We are trying to figure out how to properly extend a dynamically created radDock to basically include a footer. Currently we have tried creating a new class file and inheriting fromTelerik.Web.UI.RadDock. We are able to add an icon for the usercontrol and it works, a bit kludgy but w/e. How would we start to go about this? This is the code we are using currently to extend RadDock.
[assembly: TagPrefix("NCS_Black.CustomControls.NCSBlackRadDock", "c1")] |
namespace NCS_Black.CustomControls.NCSBlackRadDock |
{ |
[ToolboxData("<{0}:NCSBlackRadDock ID='NCSBlackRadDock1' runat=\"server\"> </{0}:NCSBlackRadDock>")] |
public class NCSBlackRadDock: Telerik.Web.UI.RadDock |
{ |
protected override void OnLoad(EventArgs e) |
{ |
} |
protected override void OnInit(EventArgs e) |
{ |
base.OnInit(e); |
// INCLUDE A WIDGET SPECIFIC ICON (IF AVAILABLE) |
Image icon = new Image(); |
icon.ImageUrl = "~/Prototype/Modules/HttpWebRequest/Images/Config.png"; |
icon.CssClass = "imgFloatLT Middle"; |
this.TitlebarContainer.Controls.Add(icon); |
// INCLUDE WIDGET SETTINGS CONTROL IN TITLEBAR (IF AVAILABLE) |
DockCommand _Edit = new DockCommand(); |
_settings.Name = "Widget_Settings"; |
_settings.Text = "Edit"; |
this.Commands.Add(_settings); |
// INCLUDE REFRESH TIMESTAMP |
Panel _timePanel = new Panel(); |
_timePanel.CssClass = "WidgetTimestamp"; |
Label _timeStamp = new Label(); |
_timeStamp.Text = DateTime.Now.ToShortTimeString(); |
_timePanel.Controls.Add(_timeStamp); |
this.ContentContainer.Controls.Add(_timePanel); |
} |
} |
} |