Table of Contents

Class ControlAndLabel<TControl, TLabel>

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

Implements labeled control.

[ControlCategory("Hidden")]
public class ControlAndLabel<TControl, TLabel> : ControlAndControl, IBaseObjectWithId, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, IControlAndLabel, INotifyDataErrorInfo where TControl : AbstractControl, new() where TLabel : AbstractControl, new()

Type Parameters

TControl

Type of the inner control.

TLabel

Type of the label.

Inheritance
ControlAndLabel<TControl, TLabel>
Implements
Derived

Remarks

You can use TextBoxAndLabel, ComboBoxAndLabel or derive from ControlAndLabel<TControl, TLabel> in order to implement your own custom labeled control.

Constructors

ControlAndLabel()

Initializes a new instance of the ControlAndLabel<TControl, TLabel> class.

ControlAndLabel(Control)

Initializes a new instance of the ControlAndLabel<TControl, TLabel> class with the specified parent control.

Fields

CreateDefaultLabel

Gets or sets function that creates default labels used in the control.

Properties

HasErrors

Gets a value that indicates whether this control or its child controls have validation errors.

InnerSuggestedHeight

Gets or sets SuggestedHeight property of the main child control.

InnerSuggestedSize

Gets or sets SuggestedSize property of the main child control.

InnerSuggestedWidth

Gets or sets SuggestedWidth property of the main child control.

Label

Gets attached Label control.

LabelSuggestedWidth

Gets or sets SuggestedWidth property of the main child control.

LabelToControl

Gets or sets a value which specifies label and control alignment.

LabelVisible

Gets or sets visibility of the attached Label control.

MainControl

Gets main child control.

TitleAsObject

Gets or sets text of the attached Label control.

Methods

CreateControl()

Creates main child control.

CreateLabel()

Creates label control.

GetErrors(string?)

Gets the validation errors for this control and its child controls.

SetFocus()

Sets input focus to the control.

UpdateErrorPictureLayout()

Called when image layout of the error picture need to be updated.

Events

DelayedTextChanged

Occurs when DelayedTextChanged event of the inner control is changed.

TextChanged

Occurs when TextChanged event of the inner control is changed.