Can anyone tell me how to change RadWindow background and frame color programmably without using skin customization?
3 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 11 Dec 2012, 05:24 AM
Hi Allen,
One suggestion is that you can set different CssClass based on the condition. Here is the sample code that I tried to achieve your scenario.
CSS:
C#:
Hope this helps.
Regards,
Princy.
One suggestion is that you can set different CssClass based on the condition. Here is the sample code that I tried to achieve your scenario.
CSS:
<style type="text/css"> .preference .rwWindowContent { background-color: Green !important; } .availability .rwWindowContent { background-color: Yellow !important; }</style>C#:
protected void availability_Click(object sender, EventArgs e){ RadWindow1.CssClass = "availability";}protected void preference_Click(object sender, EventArgs e){ RadWindow1.CssClass = "preference";}Hope this helps.
Regards,
Princy.
0
Allen
Top achievements
Rank 1
answered on 11 Dec 2012, 03:04 PM
Can I also change the frame color programmably and how? Please refer to the PNG.
0
Princy
Top achievements
Rank 2
answered on 12 Dec 2012, 04:13 AM
Hi Allen,
Try the following code snippet to achieve your scenario.
CSS:
C#:
Hope this helps.
Regards,
Princy.
Try the following code snippet to achieve your scenario.
CSS:
<style type="text/css"> .preference .rwTopLeft, .preference .rwTopRight, .preference .rwTitlebar, .preference .rwFooterLeft, .preference .rwFooterRight, .preference .rwFooterCenter, .preference .rwTopResize, .preference .rwStatusbar, .preference .rwBodyLeft, .preference .rwBodyRight { background-image: none !important; background-color: Green !important; } .availability .rwTopLeft, .availability .rwTopRight, .availability .rwTitlebar, .availability .rwFooterLeft, .availability .rwFooterRight, .availability .rwFooterCenter, .availability .rwTopResize, .availability .rwStatusbar, .availability .rwBodyLeft, .availability .rwBodyRight { background-image: none !important; background-color: Yellow !important; }</style>C#:
protected void availability_Click(object sender, EventArgs e){ RadWindow1.CssClass = "availability";}protected void preference_Click(object sender, EventArgs e){ RadWindow1.CssClass = "preference";}Hope this helps.
Regards,
Princy.