Class ButtonBuilder
Inheritance
System.Object
ButtonBuilder
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Syncfusion.EJ2.dll
public class ButtonBuilder : ControlBuilder
Constructors
Declaration
Declaration
public ButtonBuilder(Button model)
Parameters
Type |
Name |
Description |
Button |
model |
|
Fields
Declaration
Field Value
Properties
Declaration
public IDictionary<string, object> HtmlAttr { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public override TextWriter Output { get; set; }
Property Value
Type |
Description |
System.IO.TextWriter |
|
Overrides
Methods
Allows Click Event
accepts string value.
Declaration
public ButtonBuilder Click(string onClick)
Parameters
Type |
Name |
Description |
System.String |
onClick |
|
Returns
Content(String)
Defines the text content
of the Button element.
{% codeBlock src='button/content/index.md' %}{% endcodeBlock %}
Declaration
public ButtonBuilder Content(string content)
Parameters
Type |
Name |
Description |
System.String |
content |
|
Returns
ContentTemplate(Action<Object>)
Declaration
public ButtonBuilder ContentTemplate(Action<object> template)
Parameters
Type |
Name |
Description |
System.Action<System.Object> |
template |
|
Returns
ContentTemplate(Func<Object, Object>)
Declaration
public ButtonBuilder ContentTemplate(Func<object, object> template)
Parameters
Type |
Name |
Description |
System.Func<System.Object, System.Object> |
template |
|
Returns
Triggers once the component rendering is completed.
Declaration
public ButtonBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
Defines class/multiple classes separated by a space in the Button element. The Button types, styles, and
size can be defined by using
this
.
{% codeBlock src='button/cssClass/index.md' %}{% endcodeBlock %}
Declaration
public ButtonBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
Specifies a value that indicates whether the Button is disabled
or not.
Declaration
public ButtonBuilder Disabled(bool disabled = true)
Parameters
Type |
Name |
Description |
System.Boolean |
disabled |
|
Returns
Defines whether to allow the cross-scripting site or not.
Declaration
public ButtonBuilder EnableHtmlSanitizer(bool enableHtmlSanitizer = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableHtmlSanitizer |
|
Returns
Enable or disable persisting component's state between page reloads.
Declaration
public ButtonBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
Enable or disable rendering component in right to left direction.
Declaration
public ButtonBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
Allows additional HTML attributes such as title, name, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
public ButtonBuilder HtmlAttributes(IDictionary<string, object> htmlAttributes)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
htmlAttributes |
|
Returns
Allows additional HTML attributes such as title, name, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
public ButtonBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
Defines class/multiple classes separated by a space for the Button that is used to include an icon.
Buttons can also include font icon and sprite image.
Declaration
public ButtonBuilder IconCss(string iconCss)
Parameters
Type |
Name |
Description |
System.String |
iconCss |
|
Returns
Positions the icon before/after the text content in the Button.
The possible values are:
Left: The icon will be positioned to the left of the text content.
Right: The icon will be positioned to the right of the text content.
Declaration
public ButtonBuilder IconPosition(IconPosition iconPosition)
Parameters
Returns
Allows the appearance of the Button to be enhanced and visually appealing when set to true
.
Declaration
public ButtonBuilder IsPrimary(bool isPrimary = true)
Parameters
Type |
Name |
Description |
System.Boolean |
isPrimary |
|
Returns
Makes the Button toggle, when set to true
. When you click it, the state changes from normal to active.
Declaration
public ButtonBuilder IsToggle(bool isToggle = true)
Parameters
Type |
Name |
Description |
System.Boolean |
isToggle |
|
Returns
Declaration
public HtmlString Render()
Returns
Type |
Description |
System.Web.HtmlString |
|
Allows Type Property
accepts string value
Declaration
public ButtonBuilder Type(string type)
Parameters
Type |
Name |
Description |
System.String |
type |
|
Returns