Class FabBuilder
Inheritance
System.Object
FabBuilder
Assembly: Syncfusion.EJ2.dll
public class FabBuilder : ControlBuilder
Constructors
Declaration
Declaration
public FabBuilder(Fab model)
Parameters
Type |
Name |
Description |
Fab |
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
Content(String)
Defines the text content
of the Button element.
{% codeBlock src='button/content/index.md' %}{% endcodeBlock %}
Declaration
public FabBuilder Content(string content)
Parameters
Type |
Name |
Description |
System.String |
content |
|
Returns
ContentTemplate(Action<Object>)
Declaration
public FabBuilder ContentTemplate(Action<object> template)
Parameters
Type |
Name |
Description |
System.Action<System.Object> |
template |
|
Returns
ContentTemplate(Func<Object, Object>)
Declaration
public FabBuilder 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 FabBuilder 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 FabBuilder 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 FabBuilder Disabled(bool disabled = true)
Parameters
Type |
Name |
Description |
System.Boolean |
disabled |
|
Returns
Defines whether to allow the cross-scripting site or not.
Declaration
public FabBuilder EnableHtmlSanitizer(bool enableHtmlSanitizer = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableHtmlSanitizer |
|
Returns
Enable or disable persisting component's state between page reloads.
Declaration
public FabBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
Enable or disable rendering component in right to left direction.
Declaration
public FabBuilder 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 FabBuilder 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 FabBuilder 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 FabBuilder IconPosition(IconPosition iconPosition)
Parameters
Returns
Defines whether to apply primary style for FAB.
Declaration
public FabBuilder 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 FabBuilder IsToggle(bool isToggle = true)
Parameters
Type |
Name |
Description |
System.Boolean |
isToggle |
|
Returns
Defines the position of the FAB relative to target.
The possible values are:
TopLeft: Positions the FAB at the target's top left corner.
TopCenter: Positions the FAB at the target's top left corner.
TopRight: Positions the FAB at the target's top left corner.
MiddleLeft: Positions the FAB at the target's top left corner.
MiddleCenter: Positions the FAB at the target's top left corner.
MiddleRight: Positions the FAB at the target's top left corner.
BottomLeft: Positions the FAB at the target's top left corner.
BottomCenter: Places the FAB on the bottom-center position of the target.
BottomRight: Positions the FAB at the target's bottom right corner.
Declaration
public FabBuilder Position(FabPosition position)
Parameters
Returns
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
Defines the selector that points to an element in which the FAB will be positioned.
By default, FAB is positioned based on viewport of browser.
The target element must have relative position, else FAB will get positioned based on the closest element which has relative position.
Declaration
public FabBuilder Target(string target)
Parameters
Type |
Name |
Description |
System.String |
target |
|
Returns
Defines whether the fab is visible or hidden.
Declaration
public FabBuilder Visible(bool visible = true)
Parameters
Type |
Name |
Description |
System.Boolean |
visible |
|
Returns