DropDownControls
Attaches to a System.Windows.Forms.Control and provides buffered
painting functionality.
Uses TState to represent the visual state of the control. Animations
are attached to transitions between states.
Any type representing the visual state of the control.
Raises the PaintVisualState event.
BufferedPaintEventArgs instance.
Initialises a new instance of the BufferedPainter class.
Control this instance is attached to.
For best results, use a control which does not paint its background.
Note: Buffered painting does not work if the OptimizedDoubleBuffer flag is set for the control.
Returns a value indicating whether buffered painting is supported under the current OS and configuration.
Short-hand method for adding a state transition.
The previous visual state.
The new visual state.
Duration of the animation (in milliseconds).
Short-hand method for adding a state change trigger.
Type of trigger.
Visual state applied when the trigger occurs.
Bounds within which the trigger applies.
How the bounds are anchored to the control.
Evaluates all state change triggers.
Helper method for EvalTriggers().
Type of trigger to search for.
Reference to the visual state variable to update (if the trigger occurs).
Deactivates buffered painting.
Fired when the control must be painted in a particular state.
Gets whether buffered painting is supported for the current OS/configuration.
Gets the control this instance is attached to.
Gets or sets the default animation duration (in milliseconds) for state transitions. The default is zero (not animated).
Gets or sets whether animation is enabled.
Gets or sets the default visual state. The default value is 'default(TState)'.
Gets the collection of state transitions and their animation durations.
Only one item for each unique state transition is permitted.
Gets the collection of state change triggers.
Only one item for each unique combination of type and visual state is permitted.
Gets or sets the current visual state.
Represents a transition between two visual states. Describes the duration of the animation.
Two transitions are considered equal if they represent the same change in visual state.
Any type representing the visual state of the control.
Initialises a new instance of the BufferedPaintTransition class.
The previous visual state.
The new visual state.
Duration of the animation (in milliseconds).
Determines if two instances are equal.
The object to compare.
Serves as a hash function for a particular type.
Gets the previous visual state.
Gets the new visual state.
Gets or sets the duration (in milliseconds) of the animation.
Represents a trigger for a particular visual state.
Two triggers are considered equal if they are of the same type and visual state.
Any type representing the visual state of the control.
Initialises a new instance of the VisualStateTrigger class.
Type of trigger.
Visual state applied when the trigger occurs.
Bounds within which the trigger applies.
Determines if two instances are equal.
The object to compare.
Serves as a hash function for a particular type.
Gets the type of trigger.
Gets the visual state applied when the trigger occurs.
Gets or sets the bounds within which the trigger applies.
Gets or sets how the bounds are anchored to the edge of the control.
Represents the types of trigger which can change the visual state of a control.
The control receives input focus.
The mouse is over the control.
The left mouse button is pressed on the control.
EventArgs class for the BufferedPainter.PaintVisualState event.
Any type representing the visual state of the control.
Initialises a new instance of the BufferedPaintEventArgs class.
Visual state to paint.
Graphics object on which to paint.
Gets the visual state to paint.
Gets the Graphics object on which to paint.
Represents a control which provides ComboBox-like functionality, displaying its
dropdown items (nodes) in a manner similar to a TreeView control.
Abstract base class for a control which behaves like a dropdown but does not contain
logic for displaying a popup window.
Creates a new instance of DropDownControlBase.
Gets the bounds of the textbox portion of the control by subtracting the dropdown button bounds from the client rectangle.
Converts a ComboBoxState value into its equivalent PushButtonState value.
Determines the state in which to render the textbox portion of the control (when using visual styles).
Determines the state in which to render the dropdown button portion of the control (when using visual styles).
Determines the state in which to render the dropdown button portion of the control (when not using visual styles).
Registers the arrow keys as input keys.
Raised the DropDownButtonClick event.
Raises the DropDown event.
Raises the DropDownClosed event.
Recalculates the fixed height of the control when the font changes.
Repaints the focus rectangle when focus changes.
Repaints the focus rectangle when focus changes.
Prevents the control's background from painting normally.
Paints the content in the editable portion of the control, providing additional measurements and operations.
Repaints the control when the mouse enters its bounds.
Repaints the control when the mouse leaves its bounds.
Repaints the control when a mouse button is pressed.
Repaints the control when a mouse button is released.
Repaints the control when the mouse is moved over the control.
Determines when to raise the DropDownButtonClick event.
Recalculates the bounds for the dropdown button when the control's size changes.
Repaints the control when the control is enabled/disabled.
Sets the fixed height of the control, based on the font size.
Calculates and returns the bounds for the dropdown button for a dropdown control.
Draws a legacy style combo box control.
Paints the control using the Buffered Paint API.
Determines whether to draw the control with visual styles.
Opens or closes the dropdown portion of the control.
Gets or sets the background color to use for this control.
Hides the BackgroundImage property on the designer.
Hides the BackgroundImageLayout property on the designer.
Fired when the user clicks the dropdown button at the right edge of the control.
Fired when the drop-down portion of the control is displayed.
Fired when the drop-down portion of the control is closed.
Fired when the content of the editable portion of the control is painted.
Initalises a new instance of ComboTreeBox.
Prevents the dropdown portion of the control from being updated until the EndUpdate method is called.
Collapses all nodes in the tree for when the dropdown portion of the control is reopened.
Disposes of the control and its dropdown.
Updates the dropdown portion of the control after being suspended by the BeginUpdate method.
Expands all nodes in the tree for when the dropdown portion of the control is reopened.
Returns the next displayable node, relative to the selected node.
Returns the previous displayable node, relative to the selected node.
Returns the image referenced by the specified node in the ImageList component associated with this control.
Returns the image associated with the specified node.
Determines whether the specified node should be displayed.
Toggles the visibility of the dropdown portion of the control.
Scrolls between adjacent nodes, or scrolls the drop-down portion of
the control in response to the mouse wheel.
Updates the dropdown's font when the control's font changes.
Handles keyboard shortcuts.
Closes the dropdown portion of the control when it loses focus.
Paints the selected node in the control.
Facilitates various keyboard shortcuts.
Returns the full path to the specified .
Returns the node at the specified path.
Returns a string containing the concatenated text of the checked nodes.
Raises the event.
Raises the event.
Determines whether the specified node belongs to this ComboTreeBox, and
hence is a valid selection. For the purposes of this method, a null
value is always a valid selection.
Sets the value of the DroppedDown property, optionally without raising any events.
Sets the value of the SelectedNode property and raises the SelectedNodeChanged event.
Sorts the contents of the tree using the default comparer.
Sorts the contents of the tree using the specified comparer.
Gets the (recursive) superset of the entire tree of nodes contained
within the control.
Gets or sets a value indicating whether the check state of a node is
determined by its child nodes, and vice versa. If set to true, this
means that only the check state of leaf nodes is significant.
Gets or sets a (recursive) sequence containing the nodes whose
property is equal to
. If the
property is set to true, only leaf nodes are included.
Gets or sets the string used to separate the checked nodes.
Gets or sets the height of the dropdown portion of the control.
Gets or sets whether the dropdown portion of the control is displayed.
Gets or sets the index of the default image to use for nodes when expanded.
Gets or sets the name of the default image to use for nodes when expanded.
Gets or sets the index of the default image to use for nodes.
Gets or sets the name of the default image to use for nodes.
Gets or sets an ImageList component which provides the images displayed beside nodes in the control.
Gets the collection of top-level nodes contained by the control.
Gets or sets the text displayed in the editable portion of the control if the SelectedNode property is null.
Gets or sets the path to the selected node.
Gets or sets the string used to separate nodes in the Path property.
Gets or sets the node selected in the control.
Gets or sets a value indicating whether a checkbox is shown beside each node.
Determines whether the full path to the selected node is displayed in the editable portion of the control.
Gets whether the owning control is displaying focus cues.
Hides the Text property from the designer.
Gets or sets a value indicating whether node checkboxes move into the state after the state.
Gets or sets the first visible ComboTreeNode in the drop-down portion of the control.
Determines whether the property of the nodes is used to construct the path string.
The default behaviour is to use the property.
Gets the number of ComboTreeNodes visible in the drop-down portion of the control.
Gets a value indicating whether glyph lines need to be drawn to the left of each node.
Fired when the value of the property changes.
Fired when the value of a node's property changes.
Represents the dropdown portion of the ComboTreeBox control. The nodes are displayed in a
manner similar to the TreeView control.
Initialises a new instance of ComboTreeDropDown and associates it with its parent ComboTreeBox.
Generates a bitmap to display beside the ToolStripItem representation of the specified node.
Determines how to draw a scrollbar button.
Determines how to draw a checkbox glyph.
Returns the ComboTreeNodeCollection to which the specified node belongs.
Determines all of the parameters for drawing the bitmap beside the
specified node. If they represent a unique combination, the bitmap is
generated and returned. Otherwise, the appropriate cached bitmap is
returned.
Determines how to draw the main part of the scrollbar.
Determines how to draw the down arrow on the scrollbar.
Determines how to draw the up arrow on the scrollbar.
Determines how to draw the 'thumb' button on the scrollbar.
Registers the arrow keys as input keys.
Updates the status of the dropdown on the owning ComboTreeBox control.
Prevents the clicking of items from closing the dropdown.
Updates the font on the items when the drop-down's font changes.
Handles keyboard shortcuts.
Handles keyboard shortcuts.
Handles dragging of the scrollbar and hot-tracking in response to movement of the mouse.
Handles scrolling in response to the left mouse button being clicked.
Disengages dragging of the scrollbar and handles hot-tracking in
response to the mouse button being released.
Handles the expand/collapse of nodes and selection in response to the
mouse being clicked.
Terminates dragging of the scrollbar in response to the mouse
returning to the control.
Terminates dragging of the scrollbar in response to the mouse leaving
the control.
Paints the drop-down, including all items within the scrolled region
and, if appropriate, the scrollbar.
Displays the dropdown beneath its owning ComboTreeBox control.
Expands parent nodes until the specified node is visible.
Highlights and scrolls to the specified node.
Scrolls the drop-down up or down by the specified number of items.
Scrolls the drop-down so as to ensure that the highlighted item is at
either the top or bottom of the scrolled region.
Updates the items in the scrolled region. This method is called
whenever the scroll offset is changed.
Releases resources used by the bitmap cache.
Regenerates the items on the dropdown. This method is called whenever
a significant change occurs to the dropdown, such as a change in the
tree or changes to the layout of the owning control.
Releases resources used by the component.
Gets the collapsed (+) glyph to paint on the dropdown.
Removes extraneous default padding from the dropdown.
Gets or sets the maximum height of the dropdown.
Gets the expanded (-) glyph to paint on the dropdown.
Gets or sets the first visible ComboTreeNode in the drop-down portion of the control.
Gets the number of ComboTreeNodes visible in the drop-down portion of the control.
Represents the information needed to draw and interact with a node in the drop-down.
Creates a new instance of the NodeInfo class to represent the
specified ComboTreeNode.
Gets the node represented by this item.
Gets or sets a reference to the bitmap shown beside this item,
containing the node's image, plus/minus glyph and lines.
Gets or sets the current bounds of the item in the drop-down.
Gets or sets the current bounds of the glyph section of the
item, which is clickable.
Gets or sets the current bounds of the checkbox section of the
item (if node checkboxes are displayed).
Represents the information needed to draw and interact with the scroll
bar.
Gets or sets the bounds of the entire scrollbar.
Gets or sets the bounds of the up arrow.
Gets or sets the bounds of the down arrow.
Gets or sets the bounds of the 'thumb' button.
Represents the variables which determine the bitmap to draw beside an
item. In a drop-down with a large number of items, there may be only a
small number of distinct bitmaps. This structure serves as a key to
aid in identifying the bitmap to use.
Used as the comparison function in the bitmap cache; ensures that
bitmaps are only created for distinct combinations of these
variables.
Gets or sets whether the node has children. This is used to
determine if the plus/minus glyph is drawn.
Gets or sets whether the node is the last peer in its branch of
the tree. These nodes do not draw a connector to their successor.
Gets or sets whether the node is the first in the entire tree. The
very first node does not draw a connector to its predecessor.
Gets or sets the index of the image in the ComboTreeNode's
ImageList component to draw beside this node.
Gets or sets the name of the image in the ComboTreeNode's
ImageList component to draw beside this node.
Gets or sets the zero-based depth of the node in the tree. This is
used to calculate indents.
Gets or sets whether the node has children and is expanded. This
will cause a connector to be drawn to the sub-tree.
Gets or sets whether outer vertical connectors are to be drawn for
each successive parent of the node.
Represents a node in the ComboTreeBox. A node may have a name, text, font style, image and
may contain child nodes. If so, it can be expanded or collapsed.
Initialises a new instance of ComboTreeNode using default (empty) values.
Initialises a new instance of ComboTreeNode with the specified text.
Initialises a new instance of ComboTreeNode with the specified name and text.
Returns the full path to this node, using the specified path separator.
Separator between the elements that make up the path.
Whether to construct the path from the property
instead of the property.
The path string.
Returns the aggregate check state of this node's children.
Returns a string representation of this .
Raises the event.
Compares two ComboTreeNode objects using a culture-invariant, case-insensitive comparison of the Text property.
Gets or sets the node that owns this node, or null for a top-level node.
Gets or sets the text displayed on the node.
Gets or sets the font style to use when painting the node.
Gets or sets the index of the image (in the ImageList on the ComboTreeBox control) to use for this node.
Gets or sets the name of the image to use for this node.
Gets or sets whether the node is expanded (i.e. its child nodes are visible). Changes are not reflected in the dropdown portion of the
control until the next time it is opened.
Gets or sets the index of the image to use for this node when expanded.
Gets or sets the name of the image to use for this node when expanded.
Gets a collection of the child nodes for this node.
Gets or sets the name of the node.
Determines the zero-based depth of the node, relative to the ComboTreeBox control.
Gets or sets the check state when the property is set to true.
Gets or sets the checked state when the property is set to true.
Gets or sets a user-defined object associated with this ComboTreeNode.
Fired when the value of the property changes.
Event arguments for the event.
Initialises a new instance of the class using the specified node.
Gets the affected node.
Represents a collection of ComboTreeNode objects contained within a node or a ComboTreeBox control.
Supports change notification through INotifyCollectionChanged. Implements the non-generic IList to
provide design-time support.
Initalises a new instance of ComboTreeNodeCollection and associates it with the specified ComboTreeNode.
Creates a node and adds it to the collection.
Creates a node and adds it to the collection.
Adds a range of ComboTreeNode to the collection.
Determines whether the collection contains a node with the specified name.
Removes the node with the specified name from the collection.
Returns the index of the node with the specified name.
Raises the CollectionChanged event.
Sorts the collection and its entire sub-tree using the specified comparer.
Recursive helper method for Sort(IComparer<ComboTreeNode>).
Adds event handlers to the specified node.
Removes event handlers from the specified node.
Raises the event.
Returns the that corresponds to the specified path string.
The path string.
The path separator.
Whether the path is constructed from the name of the node instead of its text.
The node, or null if the path is empty.
Returns the with the specified node text.
The text to match.
The type of string comparison performed.
Whether to search recursively through all child nodes.
Adds a node to the collection.
Clears the collection.
Determines whether the collection contains the specified node.
Copies all the nodes from the collection to a compatible array.
Removes the specified node from the collection.
Returns an enumerator which can be used to cycle through the nodes in the collection (non-recursive).
Returns the index of the specified node.
Inserts a node into the collection at the specified index.
Removes the node at the specified index from the collection.
Fired when the check state of a node in the collection (or one of its children) changes.
Gets the node with the specified name.
Gets the number of nodes in the collection.
Gets or sets the node at the specified index.
Fired when the collection (sub-tree) changes.
A column type based on the
control.
Both the underlying values and formatted values of cells in the column
are path strings. If the column is bound to a data source, the data
source values must also be path strings. You can decide which options
to use when constructing path strings.
Some of the more advanced features of the
control (such as checkboxes) are not supported by this column type.
Base class for custom column types.
Constructor.
Gets a value indicating whether buffered painting is supported.
Used when rendering cells.
Initialises a new instance of the class.
Returns a copy of the column.
Gets or sets the index of the default image to use for nodes when expanded.
Gets or sets the name of the default image to use for nodes when expanded.
Gets or sets the index of the default image to use for nodes.
Gets or sets the name of the default image to use for nodes.
Gets or sets an ImageList component which provides the images displayed beside nodes in the control.
Gets the collection of top-level nodes contained by the column.
Gets or sets the string used to separate nodes in the Path property.
Determines whether the full path to the selected node is displayed in the column.
Determines whether the property of the nodes is used to construct the path string.
The default behaviour is to use the property.
Custom cell type to accompany .
Base class for custom cell types.
Paints common elements behind the cell content.
Paints common elements in front of the cell content.
Initialises a new instance of the class.
Parses the formatted value from the editing control.
For this cell type, the formatted value and the underlying value are the same.
Gets the formatted value for the cell.
For this cell type, the formatted value and the underlying value are the same.
Returns a copy of the cell.
Initialises the editing control for the cell.
Paints the cell.
Gets a collection of nodes to use instead of the owning column's
nodes.
Gets or sets a value indicating whether to use the
collection for the cell instead of the owning
column's nodes.
Gets the type of editing control to use for the cell.
Gets the type of the cell's formatted values.
Editing control to accompany .
Constructor.
A column type based on the
control.
Unlike the , the items in the
combo box for this column type may only come from a data source.
However, you can override the data source for cells on an individual
basis.
The formatted value type for this column is always
. You do not have to explicitly set the
, or
properties.
Initialises a new instance of the class.
Returns a copy of the column.
Gets or sets the name of the property of a list item which provides its display value.
Gets or sets the name of the property of a list item which provides its underlying value.
Gets or sets the name of the property of a list item which provides its grouping value.
Gets or sets the data source that populates the items in the combo box.
Custom cell type to accompany .
Parses a formatted value from the editing control.
This works by matching the editing control's text against the
display values for the list items.
Gets the formatted value for the cell.
Returns a copy of the cell.
Initialises the editing control for the cell.
Paints the cell.
Gets or sets a value which overrides the owning column's
property.
Gets or sets a value which overrides the owning column's
property.
Gets or sets a value which overrides the owning column's
property.
Gets or sets a value which overrides the owning column's
property.
Gets the type of editing control used by the cell.
Gets the type of the formatted value for the cell, which is
.
Editing control to accompany .
Implementation based on .
Represents a Windows combo box control that, when bound to a data source, is capable of
displaying items in groups/categories.
Initialises a new instance of the GroupedComboBox class.
Releases the resources used by the control.
Recreates the control's handle when the DropDownStyle property changes.
Redraws the control when the dropdown portion is displayed.
Redraws the control when the dropdown portion closes.
Repaints the control when it receives input focus.
Repaints the control when it loses input focus.
Paints the control without a background (when using buffered painting).
Redraws the control when the selected item changes.
Explicit interface implementation for the IComparer.Compare method. Performs a two-tier comparison
on two list items so that the list can be sorted by group, then by display value.
Converts a ComboBoxState into its equivalent PushButtonState value.
Determines the state in which to render the control (when using buffered painting).
Determines whether the list item at the specified index is the start of a new group. In all
cases, populates the string respresentation of the group that the item belongs to.
Re-synchronises the internal sorted collection when the data source changes.
When the control font changes, updates the font used to render group names.
When the parent control changes, updates the font used to render group names.
Performs custom painting for a list item.
Determines the size of a list item.
Rebuilds the internal sorted collection.
Changes the control style to allow user-painting in DropDownList mode (when using buffered painting).
Draws a combo box in the Windows Vista (and newer) style.
Paints the control (using the Buffered Paint API).
Gets or sets the data source for this GroupedComboBox.
Gets a value indicating whether the drawing of elements in the list will be handled by user code.
Gets or sets the property to use when grouping items in the list.
Constructor.
EventArgs class for the
Creates a new instance of the DropDownPaintEventArgs class.
Draws a focus rectangle on the editable portion of the control.
Gets the display rectangle for the editable portion of the control.