/// <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 KryptonWorkspaceSequence class. /// </summary> /// <param name="orientation">Initial orientation of the children.</param> public KryptonWorkspaceSequence(Orientation orientation) { _orientation = orientation; // Create the child collection for holding items Children = new KryptonWorkspaceCollection(this); Children.PropertyChanged += OnChildrenPropertyChanged; Children.MaximizeRestoreClicked += OnChildrenMaximizeRestoreClicked; // Default properties _setVisible = true; WorkspaceStarSize = new StarSize(); WorkspaceActualSize = Size.Empty; UniqueName = CommonHelper.UniqueString; }