Class RibbonButtonSettings
Inheritance
Namespace: Syncfusion.Blazor.Ribbon
Assembly: Syncfusion.Blazor.dll
Syntax
public class RibbonButtonSettings : OwningComponentBase
Constructors
RibbonButtonSettings()
Declaration
public RibbonButtonSettings()
Properties
Content
Gets or sets the content for the button.
Declaration
public string Content { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that represents the content to be displayed on the button. The default value is |
Remarks
This property allows you to specify the text content that will be displayed on the button. You can use this to set the button's label, such as text depending on your application's needs.
Created
Gets or sets an event callback that is raised when the Button rendering is completed.
Declaration
public EventCallback Created { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback | An event handler for the Created that is triggered after the Button has been rendered. The default value is |
Remarks
This event is fired once the rendering of the Button is completed. It allows you to perform any additional actions or setup after the Button is created.
CssClass
Gets or sets one or more CSS classes to customize the appearance of the button.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing one or more CSS classes to apply to the button. The default value is |
Remarks
This property allows you to specify CSS classes that will be applied to the button, enabling you to customize its appearance according to your design requirements. By providing a string of CSS class names separated by spaces, you can apply various styles to the button, such as color, size, or layout adjustments.
Disabled
Gets or sets whether the button is disabled or not.
Declaration
public bool Disabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value that indicates whether the button is disabled. The default value is |
Remarks
This property controls the enabled/disabled state of the button. When set to true
, the button is disabled and does not respond to user interactions, such as clicks. When set to false
, the button is enabled and can be interacted with.
HtmlAttributes
Gets or sets the HTML attributes for the element.
Declaration
public Dictionary<string, object> HtmlAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | A dictionary representing the HTML attributes to be applied to the element. The default value is |
Remarks
This property allows you to specify custom HTML attributes for the element, such as id
, class
, style
, data-*
attributes, and more.
The attributes set here will be rendered as part of the HTML markup for the element and can be useful for integrating with other parts of your application or third-party libraries.
IconCss
Gets or sets one or more CSS classes for the icons to be shown in the button.
Declaration
public string IconCss { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing one or more CSS classes that define the appearance of the icons within the button. The default value is |
Remarks
This property allows you to specify CSS classes that will be applied to the icons displayed within the button. By assigning CSS classes, you can customize the icon's styling, such as its size, color, or any additional visual effects.
You can provide multiple CSS classes separated by spaces to apply various styles.
IsPrimary
Gets or sets whether the button is a primary button or not.
Declaration
public bool IsPrimary { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value that indicates whether the button is designated as a primary button. The default value is |
Remarks
This property determines whether the button is styled as a primary button, which is often used to highlight the most important action on the page. Primary buttons are typically styled differently to stand out from secondary or default buttons, making them more prominent and visually distinct.
IsToggle
Gets or sets whether the button functions as a toggle button or not.
Declaration
public bool IsToggle { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value that indicates whether the button operates as a toggle button. The default value is |
Remarks
When set to true
, the button behaves as a toggle button, which means it maintains its state between clicks. This is useful for actions that need to be turned on or off, such as toggling settings or enabling/disabling features.
OnClick
Gets or sets an event callback that is raised when the Button is clicked.
Declaration
public EventCallback<MouseEventArgs> OnClick { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<Microsoft.AspNetCore.Components.Web.MouseEventArgs> | An event handler for the OnClick that is triggered when the Button is clicked. The default value is |
Remarks
This event is used to handle click actions for the Button. When the Button is clicked, the event callback specified by this property is invoked, allowing you to execute custom logic, such as updating the UI, performing a calculation, or initiating an action.
Methods
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |