What is the Ajax colorpicker,How to use Ajax colorpicker

What is the Ajax colorpicker,How to use Ajax colorpicker in Asp.net:



The ColorPicker provide facility to user that he/she choose color at run time and apply this choose color in our asp.net web application. As you know that in this asp.net programming tutorial we consider only web applications examples. Every post gives you some important Example that is explaining how to make good web site or web application.
ColorPicker is an AJAX extender control that can be attached to any ASP.NET TextBox control. It provides client-side color-picking facility to user with UI in a popup control.
You can use this ColorPicker by clicking on a colored area to choose a color. It requires a binary reference to the ASP.NET AJAX Control Toolkit.
What is the Ajax colorpicker,How to use Ajax colorpicker
 Ajax colorpicker with textbox

Here we Exampling some event proparties and methods of colorpicker.

Ajax colorpicker Events:


  • ColorSelectionChanged(handler) – Adds or removes an event handler for the colorSelectionChanged event.
  • Parameters :  A function that represents the event handler.
  • Showing(handler) :  Adds or removes an event handler for the showing event.
  • Parameters : A function that represents the event handler.
  • Shown(handler) :  Adds or removes an event handler for the shown event.
  • Parameters :  A function that represents the event handler.
  • Hiding(handler) : Adds or removes an event handler for the hiding event.
  • Parameters : A function that represents the event handler.
  • Hidden(handler) : Adds or removes an event handler for the hidden event.
  • Parameters :  A function that represents the event handler.

ColorPicker Extender Properties:


  • Button – Gets or sets a Sys.UI.DomElement object that represents the button to use to show the color picker. This property is optional.
  • SelectedColor – Gets or sets a string that contains the color value that is represented by the text box.
  • Enabled – Gets or sets a Boolean value that specifies whether the ColorPicker behavior is available for the current element.
  • PopupPosition – Gets or sets a Sys.Extended.UI.PositionMode object
  • Remarks – The positions can be BottomLeft, BottomRight, TopLeft, or TopRight. The default isBottomLeft.


Methods of Ajax ColorPicker :


  • Initialize() : Initializes the ColorPicker behavior.
  • Dipose() : Disposes the ColorPicker behavior.
  • RaiseColorSelectionChanged() : Raises the colorSelectionChanged event.
  • RaiseShowing(eventArgs) : Raises the showing event.
  • Parameters : A Sys.EventArgs object that represents event arguments for the showing event.
  • RaiseShown(eventArgs) – Raises the shown event.
  • Parameters: A Sys.EventArgs objects that represents event arguments for the shown event.
  • RaiseHiding(eventArgs) : Raises the hiding event.
  • Parameters : A Sys.EventArgs object that represents event arguments for the hiding event.
  • RaiseHidden(eventArgs):  Raises the hidden event.
  • Parameters: A Sys.EventArgs object that represents event arguments for the hidden event.
  • Show (): Shows the color picker.
  • Hide (): Hides the color picker.



Other Asp.net Related Post:

Comments

Popular posts from this blog