/// <summary> /// Initialise a new instance of the KryptonWorkspaceCell class. /// </summary> /// <param name="starSize">Initial star sizing value.</param> public KryptonWorkspaceCell(string starSize) { // Change Navigator defaults to workspace requirements AllowPageDrag = true; AllowTabFocus = false; // Initialize internal fields _disposeOnRemove = true; WorkspaceVisible = true; WorkspaceStarSize = new StarSize(starSize); WorkspaceAllowResizing = true; UniqueName = CommonHelper.UniqueString; //seb _allowDroppingPages = true; //end seb // We need to know when the set of pages has changed Pages.Cleared += OnPagesChanged; Pages.Removed += OnPagesChanged; Pages.Inserted += OnPagesChanged; _events = true; // Add a button spec used to handle maximize/restore functionality MaximizeRestoreButton = new ButtonSpecNavigator { Type = PaletteButtonSpecStyle.WorkspaceMaximize }; MaximizeRestoreButton.Click += OnMaximizeRestoreButtonClicked; Button.ButtonSpecs.Add(MaximizeRestoreButton); }
/// <summary> /// Initialise a new instance of the KryptonWorkspaceCell class. /// </summary> /// <param name="starSize">Initial star sizing value.</param> public KryptonWorkspaceCell(string starSize) { // Change Navigator defaults to workspace requirements AllowPageDrag = true; AllowTabFocus = false; // Initialize internal fields _disposeOnRemove = true; _setVisible = true; _starSize = new StarSize(starSize); _allowResizing = true; _uniqueName = CommonHelper.UniqueString; // We need to know when the set of pages has changed Pages.Cleared += new EventHandler(OnPagesChanged); Pages.Removed += new TypedHandler <KryptonPage>(OnPagesChanged); Pages.Inserted += new TypedHandler <KryptonPage>(OnPagesChanged); _events = true; // Add a button spec used to handle maximize/restore functionality _maxamizeRestoreButton = new ButtonSpecNavigator(); _maxamizeRestoreButton.Type = PaletteButtonSpecStyle.WorkspaceMaximize; _maxamizeRestoreButton.Click += new EventHandler(OnMaximizeRestoreButtonClicked); Button.ButtonSpecs.Add(_maxamizeRestoreButton); }