Table of Contents

Class GenericControl

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Implements generic control which is handled inside the library. Generic control doesn't have native handle.

public class GenericControl : AbstractControl, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, ILayoutItem, INotifyDataErrorInfo
Inheritance
GenericControl
Implements
Derived

Constructors

GenericControl()

Initializes a new instance of the GenericControl class.

Properties

Cursor

Gets or sets the cursor that the control should normally display.

DropDownMenu

Gets or sets ContextMenu which is shown when control is clicked with left mouse button. Do not mix this with ContextMenu which is shown when right mouse button is clicked.

IsClipped

Gets or sets whether control contents is clipped and is not painted outside it's bounds.

IsHandleCreated

Gets a value indicating whether the control has a native window handle associated with it.

NonGenericParent

Gets the first parent control in the parent chain which is not GenericControl.

RefreshOptions

Gets or sets different behavior and visualization options.

ShowDropDownMenuWhenClicked

Gets or sets a value indicating whether the drop down menu is shown when the control is clicked. Default is true.

Methods

DefaultPaint(PaintEventArgs)

Default painting method of the GenericControl and its descendants.

GetBackground(VisualControlState)

Gets the background brush for specified state of the control.

GetBackgroundAction(VisualControlState)

Gets the background paint action for specified state of the control.

GetBorderSettings(VisualControlState)

Gets the border settings for specified state of the control.

Invalidate()

Invalidates the control and causes a paint message to be sent to the control.

OnBoundsChanged(EventArgs)

Called when the BoundsChanged event is raised.

OnMouseLeftButtonDown(MouseEventArgs)

Called when the left mouse button was pressed.

OnPaint(PaintEventArgs)

Called when the control is redrawn. See Paint for details.

OnVisibleChanged(EventArgs)

Called when the value of the Visible property changes.

OnVisualStateChanged(EventArgs)

Called when VisualStateChanged property is changed.

ShowDropDownMenu()

Shows attached drop down menu.

Update()

Causes the control to redraw the invalidated regions.