jUserControl control is analogous the .Net Compact Framework's UserControl, but has a much more rich appearance, and a few additional features.
Like the .Net Compact Framework's UserControl, its primary purpose is to provide the ability to create composite controls.
To create a new jUserControl, use the Project–>Add New Item… menu, and choose the jUserControl template.
After adding the new
jUserControl to the project, the designer will appear and child controls can be added.
HINT: By default, the
Fill property is
Transparent which may make the background look strange since there are no other controls behind it. To make using the designer easier, change the
Fill property to an opaque color. When designing is finished, and if transparency is desired, changed it back to
Border properties are used to color the interior of the control and the perimeter of the control, respectively. For more information, please see Fills, Strokes, and Borders.
jUserControl employs the same text features used by many of the other controls in the jControls CF35 library including
TextWrap. See Text Features for more information.
This example shows a
LabeledValue control which consists of two labels: one holding a value “0.00”, and one labeling that value “Label”.
LabeledValue control, it is much more convenient and consistent to create a table of name-value fields than creating each label individually.
Sometimes, after creating custom controls or user controls, the controls don't show up in the Visual Studio toolbox. The Visual Studio toolbox is notoriously flaky, and we believe this is due to bug(s) in Visual Studio. To get the new control to appear in the toolbox, close all open files, rebuild the solution, then open one of the UI designers (e.g. the application's form).