Class Button
Extension of the FormField<T> class representing a button in html.
public class Button : FormField<Button>, IFormField, IBlockElement, IAbstractElement, IElement, IPropertyContainer, IAccessibleElement
- Inheritance
-
Button
- Implements
- Inherited Members
Constructors
Button(string)
Creates a new Button instance.
public Button(string id)
Parameters
id
stringthe id
Methods
Add(IBlockElement)
Adds any block element to the div's contents.
public virtual Button Add(IBlockElement element)
Parameters
element
IBlockElement
Returns
- Button
this Element
Add(Image)
Adds an image to the div's contents.
public virtual Button Add(Image element)
Parameters
Returns
- Button
this Element
GetAccessibilityProperties()
public override AccessibilityProperties GetAccessibilityProperties()
Returns
GetDefaultProperty<T1>(int)
public override T1 GetDefaultProperty<T1>(int property)
Parameters
property
int
Returns
- T1
Type Parameters
T1
IsSingleLine()
Indicates if this element represents an input with type button in html.
public virtual bool IsSingleLine()
Returns
- bool
true if it's the button with only one line caption.
MakeNewRenderer()
protected override IRenderer MakeNewRenderer()
Returns
SetSingleLineValue(string)
Sets passed string value to the single line button caption.
public virtual Button SetSingleLineValue(string value)
Parameters
value
stringstring value to be set as caption.
Returns
Remarks
Sets passed string value to the single line button caption. Value will be clipped if it is not fit into single line. For multiple line value use SetValue(string) . Note that when adding other elements to the button after this method is called, this added value can be multiline.
SetValue(string)
Adds passed string value as paragraph to the button.
public override IFormField SetValue(string value)
Parameters
value
stringstring value to be added into button.
Returns
Remarks
Adds passed string value as paragraph to the button. Value can be multiline if it is not fit into single line. For single line value use SetSingleLineValue(string) . Note that the new value will replace all already added elements.