Velaptor.UI.ControlBase
Velaptor
Velaptor.UI
ControlBase Class
Represents a basic control with behavior that is shared among all controls.
public abstract class ControlBase :
Velaptor.UI.IControl,
Velaptor.IUpdatable,
Velaptor.IDrawable,
Velaptor.Content.IContentLoadable,
Velaptor.UI.ISizable
Inheritance System.Object → ControlBase
Derived
↳ Button
↳ Label
↳ TextBox
Implements IControl, IUpdatable, IDrawable, IContentLoadable, ISizable
Properties
Bottom
Gets or sets the position of the bottom of the control.
public virtual int Bottom { get; set; }
Implements Bottom
Property Value
Enabled
Gets or sets a value indicating whether or not the control is enabled.
public virtual bool Enabled { get; set; }
Implements Enabled
Property Value
HalfHeight
Gets the half height of the ControlBase.
public virtual uint HalfHeight { get; }
Implements HalfHeight
Property Value
HalfWidth
Gets the half width of the ControlBase.
public virtual uint HalfWidth { get; }
Implements HalfWidth
Property Value
Height
Gets or sets the height of the ControlBase.
public virtual uint Height { get; set; }
Implements Height
Property Value
IsLoaded
Gets a value indicating whether or not the content for an object is loaded.
public bool IsLoaded { get; set; }
Implements IsLoaded
Property Value
IsMouseOver
Gets a value indicating whether or not the mouse is hovering over the button.
public bool IsMouseOver { get; set; }
Implements IsMouseOver
Property Value
Left
Gets or sets the position of the left side of the control.
public virtual int Left { get; set; }
Implements Left
Property Value
MouseDownColor
Gets or sets the color to apply to the control when the
mouse button is in the down position over the control.
public System.Drawing.Color MouseDownColor { get; set; }
Property Value
MouseHoverColor
Gets or sets the color to apply to the control when the mouse button is hovering over the control.
public System.Drawing.Color MouseHoverColor { get; set; }
Property Value
Name
Gets or sets the name of the control.
public string Name { get; set; }
Implements Name
Property Value
Position
Gets or sets the position of the IControl on the screen.
public virtual System.Drawing.Point Position { get; set; }
Implements Position
Property Value
Right
Gets or sets the position of the right side of the control.
public virtual int Right { get; set; }
Implements Right
Property Value
Top
Gets or sets the position of the top of the control.
public virtual int Top { get; set; }
Implements Top
Property Value
Visible
Gets or sets a value indicating whether or not the control is visible.
public virtual bool Visible { get; set; }
Implements Visible
Property Value
Width
Gets or sets the width of the ControlBase.
public virtual uint Width { get; set; }
Implements Width
Property Value
Methods
LoadContent()
Unloads the content for an object.
public virtual void LoadContent();
Implements LoadContent()
Render()
Renders the control to the screen.
public virtual void Render();
Implements Render()
UnloadContent()
Unloads the content for an object.
public virtual void UnloadContent();
Implements UnloadContent()
Update(FrameTime)
A user interface object that can be updated and rendered to the screen.
public virtual void Update(Velaptor.FrameTime frameTime);
Parameters
frameTime
FrameTime
Implements Update(FrameTime)
Events
ControlBase.Click Event
Occurs when the button has been clicked.
public event EventHandler<EventArgs>? Click;
Implements Click
Event Type
System.EventHandler<System.EventArgs>
ControlBase.KeyDown Event
Occurs when a keyboard key is pressed into the down position.
public event EventHandler<KeyEventArgs>? KeyDown;
Implements KeyDown
Event Type
System.EventHandler<KeyEventArgs>
ControlBase.KeyUp Event
Occurs when a keyboard key is released into the up position.
public event EventHandler<KeyEventArgs>? KeyUp;
Implements KeyUp
Event Type
System.EventHandler<KeyEventArgs>
ControlBase.MouseDown Event
Occurs when the left mouse button is in the down position over the button.
public event EventHandler<EventArgs>? MouseDown;
Implements MouseDown
Event Type
System.EventHandler<System.EventArgs>
ControlBase.MouseMove Event
Occurs when the mouse moves over the button.
public event EventHandler<MouseMoveEventArgs>? MouseMove;
Implements MouseMove
Event Type
System.EventHandler<MouseMoveEventArgs>
ControlBase.MouseUp Event
Occurs when the left mouse button is in the up position over the button
after the mouse has been in the down position.
public event EventHandler<EventArgs>? MouseUp;
Implements MouseUp