RadDock
RadDock is a control, which enables the developers to move, dock, expand/collapse any DHTML/ASP.NET content
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[RequiredScript(typeof(RadDockScripts))]
[ClientScriptResource("Telerik.Web.UI.RadDock", "Telerik.Web.UI.Common.Core.js")]
[TelerikToolboxCategory("Container")]
[ToolboxBitmap(typeof(RadDock), "Toolbox.Icons.Dock.png")]
[EmbeddedSkin("Dock")]
[EmbeddedSkin("Dock", "Default")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadDock))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadDock))]
public class RadDock : RadWebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl, INamingContainer, IPostBackEventHandler
Inheritance: objectControlWebControlRadWebControlRadDock
Implements:
Inherited Members
Constructors
public RadDock()
Properties
Specifies the UniqueNames of the RadDockZone controls, where the RadDock control will be allowed to dock.
[TypeConverter(typeof(ListConverter))]
public string[] AllowedZones { get; set; }
Gets or sets a value, indicating whether the control will initiate postback when it is docked/undocked or its position changes. The default value is false.
[ClientControlProperty]
public bool AutoPostBack { get; set; }
Gets or sets a value, indicating whether the control is closed (style="display:none;").
[ClientControlProperty]
[ClientPropertyName("_closed")]
public bool Closed { get; set; }
When the value of this property is true, the control will be hidden, but its HTML will be rendered on the page. The default value is false.
Gets or sets the tooltip of the CloseCommand when the corresponding property was not explicitly set on the command object.
public string CloseText { get; set; }
Gets or sets a value, indicating whether the control is collapsed.
[ClientControlProperty]
public bool Collapsed { get; set; }
When the value of this property is true, the content area of the control will not be visible. The default value is false.
Gets or sets the tooltip of the ExpandCollapseCommand when the dock is not collapsed and the corresponding property was not explicitly set on the command object.
public string CollapseText { get; set; }
Gets a collection of DockCommand objects representing the individual commands within the control titlebar.
[PersistenceMode(PersistenceMode.InnerProperty)]
public DockCommandCollection Commands { get; }
A DockCommandCollection that contains a collection of DockCommand objects representing the individual commands within the control titlebar.
Use the Commands collection to programmatically control the commands buttons within the control titlebar.
Gets or sets a value, indicating whether the control will initiate postback when its command items are clicked. The default value is false.
public bool CommandsAutoPostBack { get; set; }
Gets the control, where the ContentTemplate will be instantiated in.
[Browsable(false)]
public Panel ContentContainer { get; }
You can use this property to programmatically add controls to the content area. If you add controls to the ContentContainer the Text property will be ignored.
Gets or sets the System.Web.UI.ITemplate that contains the controls which will be placed in the control content area.
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[TemplateInstance(TemplateInstance.Single)]
public ITemplate ContentTemplate { get; set; }
You cannot set this property twice, or when you added controls to the ContentContainer. If you set ContentTemplate the Text property will be ignored.
Gets or sets the value, defining the commands which will appear in the RadDock titlebar when the commands collection is not modified. The default value is Close and ExpandCollapse.
public DefaultCommands DefaultCommands { get; set; }
Gets or sets the value, defining the behavior of the control titlebar and grips. The default value is TitleBar.
public DockHandle DockHandle { get; set; }
Gets or sets a value, indicating whether the control could be left undocked.
[ClientControlProperty]
public DockMode DockMode { get; set; }
Gets the ClientID of the RadDockZone, in which the control is docked. When the control is undocked, this property returns string.Empty.
[ClientControlProperty]
[Browsable(false)]
public string DockZoneID { get; set; }
Gets or sets a value, indicating whether the control will have animation.
[ClientControlProperty]
public bool EnableAnimation { get; set; }
When the value of this property is true, the RadDock will be moved, expanded, collapsed, showed and hid with animations. The default value is false.
Gets or sets a value, indicating whether the control could be dragged.
[ClientControlProperty]
[ClientPropertyName("_enableDrag")]
public bool EnableDrag { get; set; }
When the value of this property is true, the control could be dragged with the mouse. The default value is true.
Gets or sets a value, indicating whether the control will be with rounded corners.
public bool EnableRoundedCorners { get; set; }
When the value of this property is true, the control will have rounded corners. The default value is false.
Gets or sets the expanded height of the RadDock control.
[ClientControlProperty]
[ClientPropertyName("_expandedHeight")]
public int ExpandedHeight { get; set; }
Gets or sets the tooltip of the ExpandCollapseCommand when the dock is collapsed and the corresponding property was not explicitly set on the command object.
public string ExpandText { get; set; }
Specifies the UniqueNames of the RadDockZone controls, where the RadDock control will NOT be allowed to dock.
[TypeConverter(typeof(ListConverter))]
public string[] ForbiddenZones { get; set; }
Gets or sets the height of the RadDock control.
[ClientControlProperty]
public override Unit Height { get; set; }
Overrides:
Gets the position of the RadDock control in its parent zone. If undocked returns -1.
[Browsable(false)]
[ClientControlProperty]
public int Index { get; set; }
Gets or sets the horizontal position of the RadDock control in pixels. This property is ignored when the RadDock control is docked into a RadDockZone. The default value is "0px".
[ClientControlProperty]
public Unit Left { get; set; }
Gets or sets the client-side script that executes when a RadDock Command event is raised.
[ClientControlEvent]
[ClientPropertyName("command")]
public string OnClientCommand { get; set; }
Gets or sets the client-side script that executes when the RadDock control changes its position.
[ClientControlEvent]
[ClientPropertyName("dockPositionChanged")]
public string OnClientDockPositionChanged { get; set; }
Gets or sets the client-side script that executes when the RadDock control is dropped onto a zone before it changes its position.
[ClientControlEvent]
[ClientPropertyName("dockPositionChanging")]
public string OnClientDockPositionChanging { get; set; }
Gets or sets the client-side script that executes when a RadDock Drag event is raised.
[ClientControlEvent]
[ClientPropertyName("drag")]
public string OnClientDrag { get; set; }
Gets or sets the client-side script that executes when a RadDock DragEnd event is raised.
[ClientControlEvent]
[ClientPropertyName("dragEnd")]
public string OnClientDragEnd { get; set; }
Gets or sets the client-side script that executes when a RadDock DragStart event is raised.
[ClientControlEvent]
[ClientPropertyName("dragStart")]
public string OnClientDragStart { get; set; }
Gets or sets the client-side script that executes after the RadDock client-side obect is initialized.
[ClientControlEvent]
[ClientPropertyName("initialize")]
public string OnClientInitialize { get; set; }
Gets or sets the client-side script that executes after the RadDock client-side object is loaded.
[ClientControlEvent]
[ClientPropertyName("load")]
public string OnClientLoad { get; set; }
Gets or sets the client-side script that executes when a RadDock ResizeEnd event is raised.
[ClientControlEvent]
[ClientPropertyName("resizeEnd")]
public string OnClientResizeEnd { get; set; }
Gets or sets the client-side script that executes when a RadDock ResizeStart event is raised.
[ClientControlEvent]
[ClientPropertyName("resizeStart")]
public string OnClientResizeStart { get; set; }
Gets or sets a value, indicating whether the control is pinned.
[ClientControlProperty]
public bool Pinned { get; set; }
When the value of this property is true, the control will retain its position if the page scrolled. The default value is false.
Gets or sets the tooltip of the PinUnpinCommand when the dock is not pinned and the corresponding property was not explicitly set on the command object.
public string PinText { get; set; }
Gets or sets a value, indicating whether the control is resizable.
[ClientControlProperty]
[ClientPropertyName("_resizable")]
public bool Resizable { get; set; }
When the value of this property is true, the control will be resizable. The default value is false.
protected override bool SupportsRenderingMode { get; }
Overrides:
Gets or sets the additional data, which could be saved in the DockState. The default value is an empty string.
[ClientControlProperty]
public string Tag { get; set; }
Gets or sets the text which will appear in the control content area. If the ContentTemplate or the ContentContainer contain any controls, the value of this property is ignored. The default value is an empty string.
public string Text { get; set; }
Gets or sets the text which will appear in the control titlebar area. If the TitlebarTemplate or the TitlebarContainer contain any controls, the value of this property is ignored. The default value is an empty string.
[ClientControlProperty]
public string Title { get; set; }
Gets the control, in which the TitlebarTemplate will be instantiated.
[Browsable(false)]
public Panel TitlebarContainer { get; }
You can use this property to programmatically add controls to the titlebar. If you add controls to the TitlebarContainer the Title property will be ignored.
Gets or sets the System.Web.UI.ITemplate that contains the controls which will be placed in the control titlebar.
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[TemplateInstance(TemplateInstance.Single)]
public ITemplate TitlebarTemplate { get; set; }
You cannot set this property twice, or when you added controls to the TitlebarContainer. If you set TitlebarTemplate the Title property will be ignored.
Gets or sets the vertical position of the RadDock control in pixels. This property is ignored when the RadDock control is docked into a RadDockZone. The default value is "0px".
[ClientControlProperty]
public Unit Top { get; set; }
Gets or sets the unique name of the control, which allows the parent RadDockLayout to automatically manage its position. If this property is not set, the control ID will be used instead. RadDockLayout will throw an exception if it finds two RadDock controls with the same UniqueName.
[ClientControlProperty]
public string UniqueName { get; set; }
Gets or sets the tooltip of the PinUnpinCommand when the dock is pinned and the corresponding property was not explicitly set on the command object.
public string UnpinText { get; set; }
Methods
Applies the data from the supplied DockState object.
public void ApplyState(DockState state)
A DockState object, containing data about the state, which should be applied on the RadDock control.
Docks the RadDock control in the specified RadDockZone.
public void Dock(RadDockZone dockZone)
The RadDockZone control in which the control should be docked.
Docks the RadDock control in the zone with ClientID equal to dockZoneID.
public void Dock(string dockZoneID)
The ClientID of the RadDockZone control, where the control should be docked.
The RadDock control should be placed into a RadDockLayout in order this method to work. It is not necessary for the layout to be a direct parent of the RadDock control.
Returns a DockState object, containing data about the current state of the RadDock control.
public DockState GetState()
A DockState object, containing data about the current state of the RadDock control. This object could be passed to ApplyState() method.
Returns the unique name for the dock, based on the UniqueName and the ID properties.
public string GetUniqueName()
A string, containing the UniqueName property of the dock, or its ID, if the UniqueName property is not set.
protected override void RenderClassic(HtmlTextWriter writer)
Overrides:
protected override void RenderLite(HtmlTextWriter writer)
Overrides:
Removes the RadDock control from its parent RadDockZone.
public void Undock()
Events
Occurs when a command is clicked.
public event DockCommandEventHandler Command
The event handler receives an argument of type DockCommandEventArgs containing data related to this event.
Occurs when the control is docked in another RadDockZone, or its current zone position was changed.
public event DockPositionChangedEventHandler DockPositionChanged
Notifies the server control to perform the needed actions to ensure that it should be docked in the specified RadDockZone on the client.