Class RibbonColorPickerSettings
Inheritance
Namespace: Syncfusion.Blazor.Ribbon
Assembly: Syncfusion.Blazor.dll
Syntax
public class RibbonColorPickerSettings : OwningComponentBase
Constructors
RibbonColorPickerSettings()
Declaration
public RibbonColorPickerSettings()
Properties
Closing
Gets or sets an event callback that is raised before the ColorPicker popup is closed.
Declaration
public EventCallback<ColorPickerCloseEventArgs> Closing { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ColorPickerCloseEventArgs> | An event callback of type ColorPickerCloseEventArgs that provides information before the ColorPicker popup is closed. |
Remarks
This event is triggered before the ColorPicker popup closes, allowing you to perform any pre-close actions or cancel the close if necessary.
Columns
Gets or sets the number of columns in the ColorPicker palette.
Declaration
public double Columns { get; set; }
Property Value
Type | Description |
---|---|
System.Double | An integer representing the number of columns in the ColorPicker palette. The default value is 10. |
Remarks
This property determines how many columns are displayed in the ColorPicker's palette.
Created
Gets or sets an event callback that is raised once the ColorPicker is created.
Declaration
public EventCallback Created { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback | An event callback that is triggered after the ColorPicker has been fully created and initialized. |
Remarks
This event is useful for executing actions right after the ColorPicker has been initialized, such as applying custom styles or behaviors.
CssClass
Gets or sets one or more CSS classes to customize the appearance of the ColorPicker.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a CSS class string separated by space to customize the appearance of the Colorpicker. The default value is |
Remarks
Use this property to add custom CSS classes to the ColorPicker, allowing you to control its visual styling according to your requirements.
EnableOpacity
Gets or sets a value indicating whether opacity support is enabled for the ColorPicker.
Declaration
public bool EnableOpacity { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value that determines if opacity options are available. The default value is |
Remarks
Set this property to true
to enable opacity control in the ColorPicker, allowing users to adjust the opacity of selected colors. Set it to false
to disable opacity control.
HtmlAttributes
Specifies additional HTML attributes to be applied to the checkbox.
Declaration
public Dictionary<string, object> HtmlAttributes { get; set; }
Property Value
Type |
---|
System.Collections.Generic.Dictionary<System.String, System.Object> |
Label
Specifies the label text for the overflow item.
Declaration
public string Label { get; set; }
Property Value
Type |
---|
System.String |
Mode
Gets or sets the mode of the ColorPicker.
Declaration
public ColorPickerMode Mode { get; set; }
Property Value
Type | Description |
---|---|
ColorPickerMode | A ColorPickerMode value that represents the mode of the ColorPicker. The default value is Palette. |
Remarks
The mode determines how the ColorPicker will be displayed. The available modes are:
ModeSwitcher
Gets or sets a value that indicates whether to enable or disable the mode switcher option.
Declaration
public bool ModeSwitcher { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value that determines if the mode switcher is active. The default value is |
Remarks
Set this property to true
to enable the mode switcher option, allowing users to switch between different modes. Set it to false
to disable the mode switcher.
NoColor
Gets or sets a value indicating whether the "No Color" option is enabled.
Declaration
public bool NoColor { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value that determines if the "No Color" option is available. The default value is |
Remarks
Set this property to true
to enable the "No Color" option, allowing users to select an absence of color. Set it to false
to disable this option.
Opened
Gets or sets an event callback that is raised when the ColorPicker popup is opened.
Declaration
public EventCallback<ColorPickerOpenedEventArgs> Opened { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ColorPickerOpenedEventArgs> | An event callback of type ColorPickerOpenedEventArgs that is triggered when the ColorPicker popup becomes visible. |
Remarks
This event is fired when the ColorPicker popup opens, and you can use it to initialize or configure elements in the popup when it is displayed.
Opening
Gets or sets an event callback that is raised before the ColorPicker popup is opened.
Declaration
public EventCallback<ColorPickerOpenEventArgs> Opening { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ColorPickerOpenEventArgs> | An event callback of type ColorPickerOpenEventArgs that provides information before the ColorPicker popup is opened. |
Remarks
This event allows you to run actions before the popup opens or prevent it from opening by canceling the event.
PresetColors
Gets or sets the custom colors to be used in the color palette.
Declaration
public Dictionary<string, string[]> PresetColors { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String[]> | A dictionary where the key is a string representing a color group or category, and the value is an array of strings representing custom color codes (e.g., hex values). The default value is |
Remarks
Use this property to define custom color palettes for the ColorPicker. Each entry in the dictionary represents a color group with an associated array of color codes. If this property is set to null
, the ColorPicker will use its default color palette.
Selected
Gets or sets an event callback that is raised when a color is selected in the ColorPicker or palette, provided the ShowButtons property is enabled.
Declaration
public EventCallback<ColorPickerSelectedEventArgs> Selected { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ColorPickerSelectedEventArgs> | An event callback of type ColorPickerSelectedEventArgs that is triggered after a color is selected. |
Remarks
This event is fired after a color selection, and you can use it to process the selected color or trigger any subsequent actions based on the selection.
ShowButtons
Gets or sets a value indicating whether control buttons are displayed.
Declaration
public bool ShowButtons { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value that determines if the control buttons are visible. The default value is |
Remarks
Set this property to true
to show the control buttons, allowing users to interact with additional functionality. Set it to false
to hide the control buttons.
TileRendering
Gets or sets an event callback that is raised while rendering each palette tile.
Declaration
public EventCallback<TileRenderEventArgs> TileRendering { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<TileRenderEventArgs> | An event callback of type TileRenderEventArgs that provides information and allows customization during the rendering of each tile in the color palette. |
Remarks
This event provides an opportunity to customize the rendering of the palette tiles, such as changing the appearance or content of each tile.
Value
Gets or sets the color value for the ColorPicker, specified as a hexadecimal color code.
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the color value in hexadecimal format. The default value is |
Remarks
This property allows you to set the color displayed in the ColorPicker. The color should be specified in hex code format, which includes an optional alpha value for transparency. For example, #008000ff
represents a solid green color with full opacity.
ValueChange
Gets or sets an event callback that is raised 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 applying the selected color.
Declaration
public EventCallback<ColorPickerEventArgs> ValueChange { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ColorPickerEventArgs> | An event callback of type ColorPickerEventArgs that is triggered when the ColorPicker value is updated. |
Remarks
This event is triggered when the color selection changes, either during selection or when applying the selected color, depending on the ShowButtons setting.
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 |