ComponentFactory.Krypton.Docking.KryptonDockingFloatingWindow.KryptonDockingFloatingWindow C# (CSharp) Method

KryptonDockingFloatingWindow() public method

Initialize a new instance of the KryptonDockingFloatingWindow class.
public KryptonDockingFloatingWindow ( string name, Form owner, KryptonDockingFloatspace floatspace ) : System
name string Initial name of the element.
owner System.Windows.Forms.Form Reference to form that owns the floating windows.
floatspace KryptonDockingFloatspace Reference to form that will own all the floating window.
return System
        public KryptonDockingFloatingWindow(string name, Form owner, KryptonDockingFloatspace floatspace)
            : base(name)
        {
            if (owner == null)      throw new ArgumentNullException("owner");
            if (floatspace == null) throw new ArgumentNullException("floatspace");

            _floatspace = floatspace;
            _floatspace.Disposed += new EventHandler(OnDockingFloatspaceDisposed);

            // Create the actual window control and hook into events
            _window = new KryptonFloatingWindow(owner, floatspace.FloatspaceControl);
            _window.WindowCloseClicked += new EventHandler<UniqueNamesEventArgs>(OnFloatingWindowCloseClicked);
            _window.WindowCaptionDragging += new EventHandler<ScreenAndOffsetEventArgs>(OnFloatingWindowCaptionDragging);
            _window.Disposed += new EventHandler(OnFloatingWindowDisposed);

            // Create and add a control we use to obscure the floating window client area during multi-part operations
            _obscure = new ObscureControl();
            _obscure.Anchor = (AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom);
            _obscure.Visible = false;
            _window.Controls.Add(_obscure);

            // Add the floatspace as the only child of this collection
            InternalAdd(floatspace);
        }