Class InPlaceEditorButtton
Represents a customizable button used within the Syncfusion.Blazor.InPlaceEditor, typically for save and cancel actions.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.InPlaceEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class InPlaceEditorButtton : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
This component is a child of SfInPlaceEditor<TValue> and allows you to define properties such as content, CSS classes, and event handlers for the buttons.
Examples
The following example demonstrates how to configure save and cancel buttons within the Syncfusion.Blazor.InPlaceEditor.
<SfInPlaceEditor TValue="string">
<InPlaceEditorButtons>
<InPlaceEditorButton Content="Save" CssClass="e-primary"></InPlaceEditorButton>
<InPlaceEditorButton Content="Cancel"></InPlaceEditorButton>
</InPlaceEditorButtons>
</SfInPlaceEditor>
Constructors
InPlaceEditorButtton()
Declaration
public InPlaceEditorButtton()
Properties
Content
Gets or sets the text content to be displayed on the button.
Declaration
[Parameter]
public string Content { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A |
Remarks
This property is used when you want a simple text-based button. For more complex content, use the Syncfusion.Blazor.InPlaceEditor.InPlaceEditorButtton.ChildContent property.
CssClass
Gets or sets the CSS classes to be applied to the button for custom styling.
Declaration
[Parameter]
public string CssClass { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A |
Remarks
This allows for customization of the button's appearance, such as colors, borders, or layout.
Disabled
Gets or sets a value indicating whether the button is disabled.
Declaration
[Parameter]
public bool Disabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Remarks
A disabled button cannot be clicked and does not raise the OnClick event.
EnableRtl
Gets or sets a value indicating whether to render the button in a right-to-left (RTL) direction.
Declaration
[Parameter]
public bool EnableRtl { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Remarks
This is useful for internationalization and supporting languages that are read from right to left.
IconCss
Gets or sets the CSS class for an icon to be displayed on the button.
Declaration
[Parameter]
public string IconCss { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A |
Remarks
The icon's position relative to the text is determined by the IconPosition property.
IconPosition
Gets or sets the position of the icon relative to the button's text.
Declaration
[Parameter]
public IconPosition IconPosition { get; set; }
Property Value
| Type | Description |
|---|---|
| IconPosition | An IconPosition enum value. The default is Left. |
Remarks
IsPrimary
Gets or sets a value indicating whether the button should be styled as a primary action.
Declaration
[Parameter]
public bool IsPrimary { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Remarks
Primary buttons are typically used to indicate the main action in a set of buttons, such as "Save" or "Submit."
IsToggle
Gets or sets a value indicating whether the button can be toggled between an active and inactive state.
Declaration
[Parameter]
public bool IsToggle { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Remarks
When a toggle button is clicked, its visual state changes to indicate it is active.
OnClick
Specifies the event handler to be invoked when the button is clicked.
Declaration
[Parameter]
public EventCallback<MouseEventArgs> OnClick { get; set; }
Property Value
| Type | Description |
|---|---|
| EventCallback<MouseEventArgs> | An EventCallback<TValue> that will be executed when the button's click event is triggered. The default value is |
Remarks
This event is typically used to handle the save or cancel logic in the parent component.
Type
Gets or sets the type attribute of the button element.
Declaration
[Parameter]
public ButtonType Type { get; set; }
Property Value
| Type | Description |
|---|---|
| ButtonType | A ButtonType enum value. The default is Button. |
Remarks
This property determines the button's behavior in a form. The possible values are: