menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ColorPicker - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ColorPicker

    Inheritance
    System.Object
    Syncfusion.EJ2.EJTagHelper
    ColorPicker
    Namespace: Syncfusion.EJ2.Inputs
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class ColorPicker : EJTagHelper

    Constructors

    ColorPicker()

    Declaration
    public ColorPicker()

    Properties

    BeforeClose

    Triggers before closing the ColorPicker popup.

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

    The default value is null

    BeforeModeSwitch

    Triggers before Switching between ColorPicker mode.

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

    The default value is null

    BeforeOpen

    Triggers before opening the ColorPicker popup.

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

    The default value is null

    BeforeTileRender

    Trigger while rendering each palette tile.

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

    The default value is null

    Change

    Triggers while changing the colors. It will be triggered based on the showButtons property. If the property is false, the event will be triggered while selecting the colors. If the property is true, the event will be triggered while apply the selected color.

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

    The default value is null

    Columns

    It is used to render the ColorPicker palette with specified columns.

    Declaration
    public double Columns { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 10

    Created

    Triggers once the component rendering is completed.

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

    The default value is null

    CreatePopupOnClick

    Specifies the popup element creation on open.

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

    The default value is false

    CssClass

    This property sets the CSS classes to root element of the ColorPicker which helps to customize the UI styles.

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

    The default value is ""

    Disabled

    It is used to enable / disable ColorPicker component. If it is disabled the ColorPicker popup won’t open.

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

    The default value is false

    EnableOpacity

    It is used to enable / disable the opacity option of ColorPicker component.

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

    The default value is true

    EnablePersistence

    To enable or disable persisting component's state between page reloads and it is extended from component class.

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

    The default value is false

    EnableRtl

    Enable or disable rendering component in right to left direction.

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

    The default value is false

    For

    Declaration
    public override ModelExpression For { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression
    Overrides
    Syncfusion.EJ2.EJTagHelper.For

    HtmlAttributes

    Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.

    Declaration
    public object HtmlAttributes { get; set; }
    Property Value
    Type
    System.Object

    Inline

    It is used to render the ColorPicker component as inline.

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

    The default value is false

    Locale

    Overrides the global culture and localization value for this component. Default global culture is 'en-US'.

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

    The default value is ""

    Mode

    It is used to render the ColorPicker with the specified mode.

    Declaration
    public ColorPickerMode Mode { get; set; }
    Property Value
    Type Description
    ColorPickerMode

    The default value is ColorPickerMode.Picker

    ModeSwitcher

    It is used to show / hide the mode switcher button of ColorPicker component.

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

    The default value is true

    NoColor

    It is used to enable / disable the no color option of ColorPicker component.

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

    The default value is false

    OnModeSwitch

    Triggers after Switching between ColorPicker mode.

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

    The default value is null

    Open

    Triggers while opening the ColorPicker popup.

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

    The default value is null

    PresetColors

    It is used to load custom colors to palette.

    Declaration
    public object PresetColors { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    Select

    Triggers while selecting the color in picker / palette, when showButtons property is enabled.

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

    The default value is null

    ShowButtons

    It is used to show / hide the control buttons (apply / cancel) of ColorPicker component.

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

    The default value is true

    ShowRecentColors

    Specifies to show the recent color options in the color picker in the palate mode. It accepts boolean value to configure recent colors. The default value is false. If this property value is false, then the recent color user interface is not rendered in color picker component. This recent color option is rendered only in the palette mode.

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

    The default value is false

    Value

    It is used to set the color value for ColorPicker. It should be specified as Hex code.

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

    The default value is "#008000ff"

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved