Archive for category Color Picker
How use Color Picker in Asp.Net Ajax – About
Posted by VINKAS Solutions Madurai Tamilnadu India in Color Picker on June 28th, 2009
Posted by VINKAS Solutions Madurai Tamilnadu India in Color Picker on June 28th, 2009
ColorPicker is an ASP.NET AJAX extender that can be attached to any ASP.NET TextBox control. It provides client-side color-picking functionality with UI in a popup control. You can interact with the color picker by clicking on a color to select the color. Optionally, a PopupButton control and a SampleControl can be provided which allows customizing ColorPicker’s behavior.
In addition, if a custom color value is entered in a targeted TextBox then the sample control if it’s used can demonstrate a custom color even if it’s not in a color picker palette.
The first example of the color picker has been initialized with this code:
<ajaxToolkit:ColorPickerExtender runat="server"
ID="ColorPickerExtender1"
TargetControlID="Color1"
OnClientColorSelectionChanged="colorChanged" />
A colorChanged JavaScript function has been defined as following:
function colorChanged(sender) {
sender.get_element().style.color =
"#" + sender.get_selectedColor();
}
The color picker associated with a button has been initialized with this code. The properties in italic are optional:
<ajaxToolkit:ColorPickerExtender runat="server"
TargetControlID="Color2"
PopupButtonID="Image1"
SampleControlID="Sample1"
SelectedColor="33ffcc" />
It is not supported yet but will be available soon via the ColorPicker CssClass property. ColorPicker has a predefined set of CSS classes that can be overridden. It has a default style which is embedded as a WebResource and is a part of the Toolkit assembly that has styles set for all the sub-classes. You can find them in the Toolkit solution, in the “AjaxControlToolkit\ColorPicker\ColorPicker.css” file. If your CssClass does not provide values for any of those then it falls back to the default value. To customize the same the user would have to set the CssClass property to the name of the CSS style and define the styles for the individual classes so that the various elements in a ColorPicker control can be styled accordingly.
You are currently browsing the archives for the Color Picker category.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jul | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||
Copyright © 2009 Learn Asp.Net | powered by VINKAS Solutions
Entries (RSS) and Comments (RSS) ^
Recent Comments