Standard NetXP Controls

Introduction

This section provides a brief summary of each control in the NetXP Controls suite (found in NETXP.Controls.dll), containing miscellaneous controls.

AutoTextBox

This control is basically a text box with auto-complete (MRU) support. In reality, it is a combo box disguised as a text box. It stores frequently-used text entered by the user inside an XML file within isolated storage. The name of the XML file can be assigned using the AutoCompleteHeader property, which specifies the file name to use, excluding file extension.

The AutoTextBox control looks like this:

BalloonHelp

This form class allows you to display a balloon tip. It cannot be used at design time. After creating an instance of this class, set the Caption property to the title of the balloon and the Content property to the text you want to show in the balloon tip. The balloon tip, unlike the one shown by NotifyIconEx, is not shown in the system tray. You can specify any parent control for the balloon tip, and the tip will be anchored to that control. Use the ShowBalloon function to show a balloon tip using BalloonHelp.

The BalloonHelp form, when shown, looks like this:

ColorButton

This control is a button that shows a color in the center, with a drop-down arrow. It invokes a color picker form (ColorForm) when it is clicked. The last selected color is kept in the CenterColor property of this control.

The ColorButton control looks like this (with ColorForm also showing):

ComboBoxEx

This control extends a combo box, mainly adding support for images and reading history items. By setting the EnableMRU property to True, you can show all the history and recent documents in a combo box.

Set the Flags property to configure the auto-complete capabilities of the combo box. The combo box must be of the DropDown style to support auto-complete. Unlike the AutoTextBox, ComboBoxEx utilizes the system's auto-complete capabilities (from Win32), by using P-invoke.

To add image support to the items, set the ImageList property to an image list on your form, then assign image indices to the individual items.

DesktopAlert

This form is similar to the notification that Outlook shows when you receive a new email message. This form should only be used to notify the user of a new email message. To use this form, instantiate it in your code, specifying a message, a subject, and a sender. This information will be shown on the form. Then, simply set the form's position on screen, and call the Show method.

The form, when showed, should look something like this:

DropDownTreeView

The drop-down tree view control is essentially a combo box whose drop-down control is not a list box but a tree view. The underlying tree view can be accessed using the TreeView property, while the underlying text box can be accessed using the TextBox property.The text box contains the caption of the selected tree node. It is a read-only text box. To set the tree view's initial height, set the IdealTreeViewHeight property.

Graph

This control is a highly versatile graph control supporting bar graphs, line graphs, and pie charts, all in the same control. Use the GraphItems property of the Graph control to configure the bars, points, or pie slices shown on the graph. You can also configure the graph and its items through various properties. Furthermore, you can save the graph at any time as a bitmap by calling the SaveBitmap method. You can save in any image format supported by GDI+.

Sample Graph controls:

Bar Graph

Line Graph

Pie Chart

MaskedTextBox

The masked text box control enhances the functionality of the standard TextBox control by supporting a mask for validating user input. This control supports masks for date, IP address, SSN, phone number, digits, and decimals. It performs the validation, and automatically sets the delimiters to the appropriate locations. To apply a mask, use the Masked property. The control uses ErrorProvider to handle invalid input, by showing an exclamation icon next to the field when the user has entered invalid data.

MultiPage

This control is used primarily by the NetXP Wizard form. It is basically a tab control that does not show any tabs at runtime. It can be used for having multiple pages on a form but not allowing the user to navigate between them.

SkinnedPanel

This panel control draws the background for a tab page under Windows XP (when the current application is skinned). The controls inside it must be capable of supporting themed backgrounds. That is why you must use XPCheckBox and XPGroupBox inside this control rather than the their Windows Forms counterparts, since the NetXP variants support themed backgrounds while the Windows Forms controls do not.

The SkinnedPanel control looks like this when themed:

The above panel shown also contains an XPGroupBox and XPCheckBox control.

TreeViewEx

The only difference between TreeViewEx and the Windows Forms TreeView is in the way in which it handles checkboxes. TreeViewEx checks all child nodes when a parent node is checked, whereas the Windows Forms TreeView control only checks the parent node.

XPButton

The XPButton control offers several enhancements to the standard Windows Forms button control. First of all, it uses System flat style by default, which means it's always skinned, provided that the application has a manifest. It also supports images, with System flat style, which is not possible with the standard Button control. Finally, as an added eye-candy effect, the button gradually fades between normal and hover states, with minimal CPU usage.