menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class InPlaceEditorButtton - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class InPlaceEditorButtton

    Represents a customizable button used within the Syncfusion.Blazor.InPlaceEditor, typically for save and cancel actions.

    Inheritance
    System.Object
    InPlaceEditorButtton
    InPlaceEditorCancelButton
    InPlaceEditorSaveButton
    Namespace: Syncfusion.Blazor.InPlaceEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class InPlaceEditorButtton : OwningComponentBase
    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

    ChildContent

    Gets or sets the child content to be displayed within the button.

    Declaration
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    A Microsoft.AspNetCore.Components.RenderFragment representing the content to be rendered. The default value is null.

    Remarks

    This property allows you to define custom content, including other Blazor components or HTML elements. If not specified, the button's text will be determined by the Content property.

    Content

    Gets or sets the text content to be displayed on the button.

    Declaration
    public string Content { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the button's text. The default value is null.

    Remarks

    This property is used when you want a simple text-based button. For more complex content, use the ChildContent property.

    CssClass

    Gets or sets the CSS classes to be applied to the button for custom styling.

    Declaration
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    A string representing one or more CSS classes, separated by spaces. The default is null.

    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
    public bool Disabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the button is disabled; otherwise, false. The default value is false.

    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
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    true to enable RTL mode; otherwise, false. The default is false.

    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
    public string IconCss { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the icon's CSS class. The default is null.

    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
    public IconPosition IconPosition { get; set; }
    Property Value
    Type Description
    IconPosition

    An IconPosition enum value. The default is Left.

    Remarks

    Possible values are Left and Right.

    IsPrimary

    Gets or sets a value indicating whether the button should be styled as a primary action.

    Declaration
    public bool IsPrimary { get; set; }
    Property Value
    Type Description
    System.Boolean

    true to style the button as primary; otherwise, false. The default is false.

    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
    public bool IsToggle { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the button is a toggle button; otherwise, false. The default is false.

    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
    public EventCallback<MouseEventArgs> OnClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<Microsoft.AspNetCore.Components.Web.MouseEventArgs>

    An Microsoft.AspNetCore.Components.EventCallback<> that will be executed when the button's click event is triggered. The default value is null.

    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
    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:

    • ButtonThe button is a standard clickable button.
    • SubmitThe button submits the form data to the server.
    • ResetThe button resets all form controls to their initial values.
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved