Magic Logo
class
constructors
methods
properties
sample code
Class Content
Each Content instance represents a single dockable unit within the docking window framework. You will need to understand how to create and configure these objects in order to successfully achieve the correct operation of docking windows.
Constructors
It is recommended that every instance you create be given a unique title and an appropriate image. Remember that the docking environment is capable of placing more than one Content inside the same docking window. When this happens a tabbed appearance is shown and any specified image is drawn alongside the Content title.

public Content(DockingManager manager)
public Content(DockingManager manager, Control control)
public Content(DockingManager manager, Control control, string title)

public Content(DockingManager manager, Control control, string title, 
               ImageList imageList, int imageIndex)

Methods
public void BringToFront()
Use this to ensure that the Content instance is in the foreground of the docking window it is inside. When a docking window has more than one Content a tabbed appearance occurs and this method allows programmatic control over which instance is the currently selected one. If this Content is the only one inside a docking window then the method has no effect.

public void OnPropertyChanging(Property prop)
Raises a property changing event for the specified property.

public void OnPropertyChanged(Property prop)
Raises a property changed event for the specified property.

Properties
public DockingManager DockingManager
Access to the manager that is responsible for this object.

public Control Control
Used to modify the Control derived object that should be displayed to represent this Content. This could be a Panel, Form or UserControl derived object as desired. Note that this property can be changed on the fly to modify the displayed control.
Default: null

public string Title
Text used to describe this object in any tab header.
Default: ""

public string FullTitle
Text used to describe this object in the caption bar.
Default: ""

public int ImageIndex
Index of the image to be shown for this object.
Default: -1

public ImageList ImageList
Images the Content.ImageIndex indexes.
Default: null

public Icon Icon
Icon is drawn in priority to an specified image.
Default: null

public bool CaptionBar
Determines if the caption bar should be shown when this item is selected.
Default: true

public bool CloseButton
Determines if the close button should be shown on the visible caption bar.
Default: true

public bool AutoHideButton
Determines if the AutoHide button should be shown on the visible caption bar.
Default: true

public Size DisplaySize
Default size used when the object is displayed.
This is updated to reflect the current size during the lifetime of the instance.
Default: Size(150,150)

public Size AutoHideSize
Default size used when the object is becomes AutoHidden.
This is updated to reflect the current size when AutoHidden during the lifetime of the instance.
Default: Size(150,150)

public Point DisplayLocation
Define the floating form location for when the object is displayed. This is updated to reflect the current size during the lifetime of the instance.
Default: Point(150,150)

public Size FloatingSize
Default size used when the object is floated.
This is updated to reflect the current size during the lifetime of the instance.
Default: Size(150,150)

public CloseOnHide
Defines if the Content instance is removed from docking manager when hidden by user.
Default: false

public int Order
This contains a unique number that is allocated at construction and incremented each time a new instance is created. When showing a context menu the Content.Order value is used to determine the order in which objects appear in the menu.

public bool Visible
Use to discover if the instance is currently visible to the user.

public object Tag
User data can be associated with the control but is not persisted.

Sample code
C#

   Content newContent = new Content(_dockingManager);
   
   newContent.Title = "Notepad";
   newContent.Control = new RichTextBox();
   newContent.ImageList = _internalImages;
   newContent.ImageIndex = _imageIndex;

   // alternatively...

   Content newContent = new Content(_dockingManager, 
                                    new RichTextBox(),
                                    "Notepad",
                                    _internalImages
                                    _imageIndex);

VB.NET

   Dim newContent As New Content(_dockingManager)
   
   newContent.Title = "Notepad"
   newContent.Control = new RichTextBox()
   newContent.ImageList = _internalImages
   newContent.ImageIndex = _imageIndex

   ' alternatively...

   Dim newContent As New Content(_dockingManager, _
                                 New RichTextBox(), _
                                 "Notepad", _
                                 _internalImages _
                                 _imageIndex)