Control Members

The Control type exposes the following members.

Constructors


  Name Description
Public method Control
Control ctor

Methods


  Name Description
Protected method AlignText(String, Alignment, Margin, Int32)
Aligns the text.
Protected method AlignText(String, Alignment, Margin, Int32, Point%)
Aligns the text.
Public method BringToFront
Makes the control the topmost control in its container
Public method Click
Fires the MouseClick event
Protected method Clip
Clips the specified rect.
Public method Contains
Override this in custom controls to handle special cases
Public method DoDragDrop
Performs a drag drop operation
Protected method DrawCustom
Override this to do additional drawing after the control has been drawn
Protected method DrawStyle
Override this to do additional drawing Call the base method to draw the control as usual
Protected method DrawText
Override this to draw text.
Public method Equals
Public method Focus
Makes the control the focused control
Public method GetControl
Returns the first control matching the given name. This method searches all siblings.
Public method GetControlAt(Int32, Int32)
Returns the first control found below the given screen point Returns elements and controls
Public method GetControlAt(Int32, Int32, Boolean)
Returns the first control found below the given screen point
Public method GetControls<(Of <<'(T>)>>)
Returns direct children of the given type
Public method GetElements
Returns all child elements
Protected method GetOpacity()()()()
Gets the opacity.
Protected method GetOpacity(Single)
Gets the opacity.
Public method Hit
Return true if the point collides with the control
Public method InRect
Public method IsChildOf
Returns true if the given control is a sibling of the control
Protected method OnAutoSize
Override this to implement your own AutoSize behavior
Protected method OnKeyDown
Override this method to handle any keyevents passed to the control
Protected method OnKeyUp
Override this method to handle any keyevents passed to the control
Protected method OnLateUpdate
Called late every frame. Override this in special circumstances to do per-frame operations
Protected method OnStateChanged
Override this to handle state changes. This is useful to sync states between controls.
Protected method OnUpdate
Called every frame. Override this to do per-frame operations
Public method PerformLayout
Performs the layout.
Public method ProcessEvents
Processes the events.
Protected method ResetScissor
Resets the scissor test to whatever is was before the last SetScissor call
Public method ResizeTo
Resizes to.
Protected method SetScissor
Sets the scissor rectangle

Fields


  Name Description
Protected field Area
Protected field Elements

Properties


  Name Description
Public property AllowDrop
Gets/Sets whether or not the control processes DragDrop events
Public property AllowFocus
Gets/Sets whether or not the control is able to acquire focus
Public property Anchor
Gets/Sets the anchoring behavior
Public property Animation
Use this to run animations as coroutines
Public property AutoId
Gets the unique auto id.
Public property AutoSize
Gets/Sets the autosize behavior
Public property Container
Returns the parent of the control as IControlContainer
Public property Cursor
Name of the cursor to use
Public property Depth
Returns the depth of the control
Public property Desktop
Returns the root control
Public property Dock
Gets/Sets the docking behavior
Public property Enabled
Gets/Sets whether or not the control, and all its children, is enabled
Public property FadeSpeed
Gets/Sets the local fading speed
Public property IsElement
Returns true if the control is a child element
Public property Location
Returns the screen position
Public property Margin
Defines the space around a control that keeps other controls at a specified distance from the control's borders.
Public property MaxSize
Gets/Sets the maximum size. This is only used during Control.Resize
Public property MinSize
Gets/Sets the minimum size. This is only used during Control.Resize
Public property Name
Name of the control
Public property NoEvents
Gets/Sets whether or not the control is interactive and processes any events
Public property Opacity
Opacity of the control This is multiplied with any style opacity and hierarchical opacity
Public property Padding
Defines the space inside of a control that keeps child controls at a specified distance from the control's borders.
Public property Parent
Gets/Sets the parent
Public property Position
Gets/Sets the position (relative to parent)
Public property Scissor
Gets/Sets whether or not hardware scissor test is used
Public property Size
Gets/Sets the size
Public property State
Gets/Sets the state
Public property Style
Name of the ControlStyle
Public property TabIndex
tab index
Public property Tag
user defined data object
Public property Tint
Gets/Sets the color used to Tint the used Style
Public property Tooltip
Tooltip text
Public property UserData
user defined data object
Public property Visible
Gets/Sets whether or not the control is visible
Public property ZIndex
Returns the z-index

Events


  Name Description
Public event DragDrop
Raised when [drag drop].
Public event GotFocus
Raised when [got focus].
Public event KeyDown
Raised when [key down].
Public event KeyUp
Raised when [key up].
Public event LateUpdate
Raised when [late update].
Public event LostFocus
Raised when [lost focus].
Public event MouseClick
Raised when [mouse click].
Public event MouseDoubleClick
Raised when [mouse double click].
Public event MouseDown
Raised when [mouse down].
Public event MouseDrag
Raised when [mouse drag].
Public event MouseEnter
Raised when [mouse enter].
Public event MouseLeave
Raised when [mouse leave].
Public event MousePress
Raised when [mouse press].
Public event MouseUp
Raised when [mouse up].
Public event SizeChanged
Raised when [size changed].
Public event Update
Raised when [update].