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

KryptonFloatingWindow() public method

Initialize a new instance of the KryptonFloatingWindow class.
public KryptonFloatingWindow ( Form owner, KryptonFloatspace floatspace ) : System
owner System.Windows.Forms.Form Reference to form that will own all the floating window.
floatspace KryptonFloatspace Reference to owning floatspace instance.
return System
        public KryptonFloatingWindow(Form owner, KryptonFloatspace floatspace)
        {
            // Set the owner of the window so that minimizing the owner will do the same to this
            Owner = owner;

            // Set correct form settings for a floating window
            TopLevel = true;
            ShowIcon = false;
            ShowInTaskbar = false;
            MinimizeBox = false;
            StartPosition = FormStartPosition.Manual;
            ButtonSpecMin.ImageStates.ImageDisabled = EMPTY_IMAGE;

            // Hook into floatspace events and add as the content of the floating window
            _floatspace = floatspace;
            _floatspace.CellCountChanged += new EventHandler(OnFloatspaceCellCountChanged);
            _floatspace.CellVisibleCountChanged += new EventHandler(OnFloatspaceCellVisibleCountChanged);
            _floatspace.WorkspaceCellAdding += new EventHandler<WorkspaceCellEventArgs>(OnFloatspaceCellAdding);
            _floatspace.WorkspaceCellRemoved += new EventHandler<WorkspaceCellEventArgs>(OnFloatspaceCellRemoved);
            Controls.Add(_floatspace);
        }