You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: controls/textbox/appearance-and-styling/creating-a-custom-skin.md
+25-28Lines changed: 25 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,29 +29,29 @@ See [Understanding the Skin CSS File]({%slug radtextbox/appearance-and-styling/h
29
29
1. In the Solution Explorer, create a new "Green" directory in your project.
30
30
31
31
1. Copy the default **RadInput** skin files from the installation directory to the "Green" directory; copy both the \Input directory that contains the images for this skin and the Input.Default.css file that defines the skin styles.
32
-
>note The file path will typically be similar to this example: *\Program Files\Progress\UI for ASP.NET AJAX RX YYYY\Skins\Default.*
33
-
>
32
+
>note The file path will typically be similar to this example: *\Program Files\Progress\UI for ASP.NET AJAX RX YYYY\Skins\Default.*
34
33
35
34
1. In the Solution Explorer, rename "Input.Default.css" to "Input.Green.css".
36
-

35
+

37
36
1. Open Input.Green.css and replace all instances of _Default with _Green. Then save the file:
38
-

37
+

39
38
40
39
1. Drag the "Input.Green.Css" file from the Solution Explorer onto your Web page. This automatically adds a reference to the page "<head>" tag as a "<link>" to the new stylesheet:
41
-

40
+

42
41
43
42
1. Change the **Skin** property of your four **RadInput** controls to "Green".
44
43
45
44
1. Set the **EnableEmbeddedSkins** property of your four **RadInput** controls to "False".
46
45
47
46
1. Run the application. The new "Green" skin looks just like the Default skin:
48
-

47
+
48
+

49
49
50
50
## Editing the CSS classes
51
51
52
-
1.The classes that control the background for spin buttons are **.riUp** and **.riDown**. Locate the mentioned selectors. The class definitions are qualified by the **.RadInput_Green** class, which is the class definition for the entire control. Add a property to the selectors, setting the background color for the spin buttons:
52
+
The classes that control the background for spin buttons are **.riUp** and **.riDown**. Locate the mentioned selectors. The class definitions are qualified by the **.RadInput_Green** class, which is the class definition for the entire control. Add a property to the selectors, setting the background color for the spin buttons:
53
53
54
-
````CSS
54
+
````CSS
55
55
.RadInput_Greena.riUp
56
56
{
57
57
background-position: 4px-98px;
@@ -60,7 +60,7 @@ See [Understanding the Skin CSS File]({%slug radtextbox/appearance-and-styling/h
60
60
}
61
61
````
62
62
63
-
````CSS
63
+
````CSS
64
64
.RadInput_Greena.riDown
65
65
{
66
66
background-position: 4px-199px;
@@ -69,9 +69,9 @@ See [Understanding the Skin CSS File]({%slug radtextbox/appearance-and-styling/h
69
69
}
70
70
````
71
71
72
-
1.The class that controls the background of the button is **.riButton**. There is currently no definition for this class in the skin file. Add one, setting a background for the button:
72
+
The class that controls the background of the button is **.riButton**. There is currently no definition for this class in the skin file. Add one, setting a background for the button:
73
73
74
-
````CSS
74
+
````CSS
75
75
.RadInput_Greena.riButton
76
76
{
77
77
background-color: #ddffe0;
@@ -80,9 +80,9 @@ See [Understanding the Skin CSS File]({%slug radtextbox/appearance-and-styling/h
80
80
81
81
82
82
83
-
1. The text area when the control is enabled has the **.riEnabled** class applied. Locate this selector. Change the border color to Green and add a background color:
83
+
The text area when the control is enabled has the **.riEnabled** class applied. Locate this selector. Change the border color to Green and add a background color:
84
84
85
-
````CSS
85
+
````CSS
86
86
.RadInput_Green.riEnabled
87
87
{
88
88
color: #333;
@@ -93,9 +93,9 @@ See [Understanding the Skin CSS File]({%slug radtextbox/appearance-and-styling/h
93
93
94
94
95
95
96
-
1.The class that controls the text area when the mouse hovers over the control is **.riHover**. Locate this selector, and change the border color from "#000" to "Green".
96
+
The class that controls the text area when the mouse hovers over the control is **.riHover**. Locate this selector, and change the border color from "#000" to "Green".
97
97
98
-
````CSS
98
+
````CSS
99
99
.RadInput_Green.riHover
100
100
{
101
101
color: #333;
@@ -105,9 +105,9 @@ See [Understanding the Skin CSS File]({%slug radtextbox/appearance-and-styling/h
105
105
106
106
107
107
108
-
1. The class that controls the text area when it is displaying the empty message is **.riEmpty**. Locate this selector and change the color and border colors to "Green". Add in a background color as well:
108
+
The class that controls the text area when it is displaying the empty message is **.riEmpty**. Locate this selector and change the color and border colors to "Green". Add in a background color as well:
109
109
110
-
````CSS
110
+
````CSS
111
111
.RadInput_Green.riEmpty
112
112
{
113
113
color: Green;
@@ -116,11 +116,9 @@ See [Understanding the Skin CSS File]({%slug radtextbox/appearance-and-styling/h
116
116
}
117
117
````
118
118
119
+
The class that controls the text area when it has focus is **.riFocused**. Change the border color to "Green":
119
120
120
-
121
-
1. The class that controls the text area when it has focus is **.riFocused**. Change the border color to "Green":
122
-
123
-
````CSS
121
+
````CSS
124
122
.RadInput_Green.riFocused
125
123
{
126
124
border: solid1pxGreen;
@@ -129,9 +127,9 @@ See [Understanding the Skin CSS File]({%slug radtextbox/appearance-and-styling/h
129
127
````
130
128
131
129
132
-
1. The class that controls the text area when it's value is invalid is **.riError**. Add a **background-color** of "#ddd", and change the color and border-color attributes to "#ffcc55":
130
+
The class that controls the text area when its value is invalid is **.riError**. Add a **background-color** of "#ddd", and change the color and border-color attributes to "#ffcc55":
133
131
134
-
````CSS
132
+
````CSS
135
133
.RadInput_Green.riError
136
134
{
137
135
background-image: url('Input/errorSign.gif');
@@ -143,10 +141,9 @@ See [Understanding the Skin CSS File]({%slug radtextbox/appearance-and-styling/h
143
141
````
144
142
145
143
144
+
The class that controls the Label is **.riLabel**. Change the font color to "Green":
146
145
147
-
1. The class that controls the Label is **.riLabel**. Change the font color to "Green":
148
-
149
-
````CSS
146
+
````CSS
150
147
.RadInput_Green.riLabel
151
148
{
152
149
color: Green;
@@ -156,6 +153,6 @@ See [Understanding the Skin CSS File]({%slug radtextbox/appearance-and-styling/h
156
153
````
157
154
158
155
159
-
160
-
1. Run the application. The input controls should now look as follows:
156
+
Run the application. The input controls should now look as follows:
0 commit comments