# UserInterfaceControl class

Namespace: [Rhino.UI](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.ui.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public class UserInterfaceControl : UserInterfaceObjectBase
```

User interface controls are in-viewport control that act similar to controls you would find in most GUI frameworks. These are 2d screen aligned controls like buttons, labels and sliders

**Derived types:** [UserInterfaceButton](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacebutton.md), [UserInterfaceCheckBox](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecheckbox.md), [UserInterfaceDropDown](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacedropdown.md), [UserInterfaceGrid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacegrid.md), [UserInterfaceIcon](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceicon.md), [UserInterfaceLabel](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacelabel.md), [UserInterfaceRadioButton](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceradiobutton.md), [UserInterfaceSlider](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceslider.md), [UserInterfaceTextBox](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacetextbox.md)

## Constructors

- [UserInterfaceControl](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/ctor.md)

## Properties

- [BackgroundColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/backgroundcolor.md): Color the control is filled with: the face of a button, the track of a slider, the box of a check box or radio button, the field of a text box, the whole rectangle of a label, icon or grid. Color.Empty, the default, means the control chooses the color for the theme that is in use and follows the theme when it changes. Labels and icons draw no background when this is Color.Empty. A grid fills with the theme's panel color when it is a top level control, and draws no background when it is inside another control. UserInterfaceGrid.BackgroundOpacity makes the theme color see through, or turns the background off at 0.
- [HorizontalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/horizontalalignment.md)
- [Location](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/location.md)
- [Size](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/size.md)
- [Text](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/text.md)
- [TextColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/textcolor.md): Color used to draw the text. Color.Empty, the default, means use the standard text color for the theme that is in use.
- [TextHeight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/textheight.md): Height of the text in logical pixels. A value of 0, the default, means use the standard control font height. Controls that draw no text ignore this setting.
- [TextHorizontalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/texthorizontalalignment.md): Where the text sits inside the control's rectangle. This is not the same as HorizontalAlignment, which is where the control sits inside its parent.
- [TextVerticalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/textverticalalignment.md): Where the text sits inside the control's rectangle. This is not the same as VerticalAlignment, which is where the control sits inside its parent.
- [TrackingPoint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/trackingpoint.md): 3d location that control "sticks" to if not null
- [VerticalAlignment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/verticalalignment.md)

## Methods

- [ComputedRectangle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/computedrectangle.md)
- [SetSvg](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfacecontrol/setsvg.md)

## Inherited Members

- From [UserInterfaceObjectBase](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase.md): [BoundToActiveView](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/boundtoactiveview.md), [HasKeyboardFocus](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/haskeyboardfocus.md), [Tooltip](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/tooltip.md), [Visible](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/visible.md), [IsMouseOver](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/ismouseover.md), [IsRegistered](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/isregistered.md), [OnDraw](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/ondraw.md), [OnMouseClick](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseclick.md), [OnMouseDoubleClick](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousedoubleclick.md), [OnMouseDown](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousedown.md), [OnMouseEnter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseenter.md), [OnMouseLeave](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseleave.md), [OnMouseMove](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmousemove.md), [OnMouseUp](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onmouseup.md), [OnRunCommand](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/onruncommand.md), [RegisterForAllDocuments](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/registerforalldocuments.md), [RunCommand](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/runcommand.md), [Unregister](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.userinterfaceobjectbase/unregister.md)
