#region Public Constructors
public ToolStripContainer () : base ()
{
+ content_panel = new ToolStripContentPanel ();
+ content_panel.Dock = DockStyle.Fill;
+ this.Controls.Add (content_panel);
+
this.top_panel = new ToolStripPanel ();
this.top_panel.Dock = DockStyle.Top;
this.top_panel.Height = 0;
this.bottom_panel = new ToolStripPanel ();
this.bottom_panel.Dock = DockStyle.Bottom;
- this.top_panel.Height = 0;
+ this.bottom_panel.Height = 0;
this.Controls.Add (bottom_panel);
this.left_panel = new ToolStripPanel ();
this.right_panel.Dock = DockStyle.Right;
this.right_panel.Width = 0;
this.Controls.Add (right_panel);
-
- content_panel = new ToolStripContentPanel ();
- content_panel.Dock = DockStyle.Fill;
- this.Controls.Add (content_panel);
- }
+ }
#endregion
#region Public Properties
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public override bool AutoScroll {
get { return base.AutoScroll; }
set { base.AutoScroll = value; }
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new Size AutoScrollMargin {
get { return base.AutoScrollMargin; }
set { base.AutoScrollMargin = value; }
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new Size AutoScrollMinSize {
get { return base.AutoScrollMinSize; }
set { base.AutoScrollMinSize = value; }
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new Color BackColor {
get { return base.BackColor; }
set { base.BackColor = value; }
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new Image BackgroundImage {
get { return base.BackgroundImage; }
set { base.BackgroundImage = value; }
}
+
+ [Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ public override ImageLayout BackgroundImageLayout {
+ get { return base.BackgroundImageLayout; }
+ set { base.BackgroundImageLayout = value; }
+ }
[Localizable (false)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
public ToolStripPanel BottomToolStripPanel {
get { return this.bottom_panel; }
}
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new bool CausesValidation {
get { return base.CausesValidation; }
set { base.CausesValidation = value; }
}
[Localizable (false)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
public ToolStripContentPanel ContentPanel {
get { return this.content_panel; }
}
-
+
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ public new ContextMenuStrip ContextMenuStrip {
+ get { return base.ContextMenuStrip; }
+ set { base.ContextMenuStrip = value; }
+ }
+
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new ControlCollection Controls {
get { return base.Controls; }
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public override Cursor Cursor {
get { return base.Cursor; }
set { base.Cursor = value; }
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new Color ForeColor {
get { return base.ForeColor; }
set { base.ForeColor = value; }
}
[Localizable (false)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
public ToolStripPanel LeftToolStripPanel {
get { return this.left_panel; }
}
}
[Localizable (false)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
public ToolStripPanel RightToolStripPanel {
get { return this.right_panel; }
}
}
[Localizable (false)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
public ToolStripPanel TopToolStripPanel {
get { return this.top_panel; }
}
#endregion
#region Protected Methods
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
protected override ControlCollection CreateControlsInstance ()
{
- return base.CreateControlsInstance ();
+ return new ToolStripContainerTypedControlCollection (this);
}
protected override void OnSizeChanged (EventArgs e)
#endregion
#region Public Events
- static object BackgroundImageLayoutChangedEvent = new object ();
- static object ContextMenuStripChangedEvent = new object ();
-
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new event EventHandler BackColorChanged {
add { base.BackColorChanged += value; }
remove { base.BackColorChanged -= value; }
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new event EventHandler BackgroundImageChanged {
add { base.BackgroundImageChanged += value; }
remove { base.BackgroundImageChanged -= value; }
}
[Browsable (false)]
- public event EventHandler BackgroundImageLayoutChanged {
- add { Events.AddHandler (BackgroundImageLayoutChangedEvent, value); }
- remove { Events.RemoveHandler (BackgroundImageLayoutChangedEvent, value); }
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
+ public new event EventHandler BackgroundImageLayoutChanged {
+ add { base.BackgroundImageLayoutChanged += value; }
+ remove { base.BackgroundImageLayoutChanged -= value; }
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
public new event EventHandler CausesValidationChanged {
add { base.CausesValidationChanged += value; }
remove { base.CausesValidationChanged -= value; }
}
[Browsable (false)]
- public event EventHandler ContextMenuStripChanged {
- add { Events.AddHandler (ContextMenuStripChangedEvent, value); }
- remove { Events.RemoveHandler (ContextMenuStripChangedEvent, value); }
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ public new event EventHandler ContextMenuStripChanged {
+ add { base.ContextMenuStripChanged += value; }
+ remove { base.ContextMenuStripChanged -= value; }
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new event EventHandler CursorChanged {
add { base.CursorChanged += value; }
remove { base.CursorChanged -= value; }
}
[Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public new event EventHandler ForeColorChanged {
add { base.ForeColorChanged += value; }
remove { base.ForeColorChanged -= value; }
}
#endregion
+
+ #region Private Class : ToolStripContainerTypedControlCollection
+ private class ToolStripContainerTypedControlCollection : ControlCollection
+ {
+ public ToolStripContainerTypedControlCollection (Control owner) : base (owner)
+ {
+ }
+ }
+ #endregion
}
}
#endif