InputPanel

References
public sealed class InputPanel
Utility class for aggregating controls to be shown on input panels. This panel (when complete) will populate a Menu or Form or PopOver or....

Properties

Category

#
public string Category { get; }
Gets the current category. Any items added to the panel will belong to a frame with the category name.

Count

#
public int Count { get; }
Gets the number of elements on this panel.

Methods

Add

#
public void Add(Control element)
Add an element to this panel.
element (Control)

AddBar

#
public Bar AddBar(bool drawCategoryLabels, int elementHeight, params BarItem[] elements)
drawCategoryLabels (bool)
elementHeight (int)
elements (params BarItem[])

AddBar

#
public Bar AddBar(bool drawCategoryLabels, params BarItem[] elements)
Add a tool bar to this panel.
drawCategoryLabels (bool)True if the bar should be big enough to show the category names.
elements (params BarItem[])Tool bar elements.

AddCheck

#
public CheckBox AddCheck(string text, bool checked, Action<bool> checkedChanged, string tooltip = null)
Add a checkbox to this input.
text (string)
checked (bool)
checkedChanged (Action<bool>)
tooltip (string = null)

AddLabel

#
public Label AddLabel(string text, bool italic = false, string tooltip = null)
Add a label to this input.
text (string)
italic (bool = false)
tooltip (string = null)

AddSpace

#
public Control AddSpace(int height = 6)
Add a blank vertical gap to this panel. Rows sit two pixels apart, which is right for a run of related bars but too tight when one group of them needs setting apart from the group above.
height (int = 6)Height of the gap, on top of the two pixels a row already gets.

AddText

#
public TextBox AddText(string text, Action<string> textChanged, string tooltip = null)
Add a textbox to this input.
text (string)
textChanged (Action<string>)
tooltip (string = null)

BeginCategory

#
public IDisposable BeginCategory(string category)
Create a disposable category block.
category (string)Name of category.
Disposable category to be used inside a 'using' block.

MoveCategoryBelow

#
public bool MoveCategoryBelow(string category, string above)
Move an existing category directly underneath another.
category (string)Category to move.
above (string)Target category.
True if 'category' is now directly below the 'above' category.

RemoveCategory

#
public bool RemoveCategory(string name)
Remove a category from this panel. You typically wouldn't do this except sometimes it's less work to let a base class populate the panel and then remove some nonsensical category afterwards.
name (string)

RenameCategory

#
public bool RenameCategory(string oldName, string newName)
Rename a category.
oldName (string)
newName (string)

ShowAsForm

#
public Form ShowAsForm(Control owner, PointF point, RectangleF bounds)
Populate a title-bar less form with the panel contents. An attempt will be made to place the form _next to_ the bounds but failing that it will be placed next to the point.
owner (Control)Control which owns this popup.
point (PointF)Point location.
bounds (RectangleF)Source region in control coordinates.

ToEtoControl

#
public Control ToEtoControl()
Create an Eto control which hosts all the inputs on this panel.