473,402 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Programmatically Creating Themes and Skins

According to the MSDN docs, we cannot programatically create our own themes
or skins:
"Page and control developers do not use the ControlSkinDelegate,
ControlSkin, or PageTheme classes directly. These classes are used by the
ASP.NET parser and runtime ... " (from
http://msdn.microsoft.com/en-us/libr...agetheme.aspx).

My question:
Is there really no way that we can programmatically create our own themes
and have ASP.NET apply them to our pages and controls? I would like to
programmatically create my own themse, and not have to go with the expected
App_Themes directory for all of my themes. Is there some alternative I can
use?

Thanks

Jun 27 '08 #1
1 1770
On 9 May, 09:23, "Cramer" <A...@B.comwrote:
According to the MSDN docs, we cannot programatically create our own themes
or skins:
"Page and control developers do not use the ControlSkinDelegate,
ControlSkin, or PageTheme classes directly. These classes are used by the
ASP.NET parser and runtime ... " (fromhttp://msdn.microsoft.com/en-us/library/system.web.ui.pagetheme.aspx).

My question:
Is there really no way that we can programmatically create our own themes
and have ASP.NET apply them to our pages and controls? I would like to
programmatically create my own themse, and not have to go with the expected
App_Themes directory for all of my themes. Is there some alternative I can
use?

Thanks
You can change the allocation of themes to controls programatically
just as you can dynamically associate CSS classes and styles. However
the dynamic creation of new style sheets and skin files is outside
their designed purpose. The location of the theme files is fixed
because that is where ASP.NET has been hard coded to expect them (or
maybe set in machine.config).

I'm not suggesting that this can't be circumvented in some way but I
wonder whether it's worth the effort. If there is a need to vary style
attributes at run time based on some computed criteria, then it
doesn't have to come from style sheets or skin files. It could be
derived from re-useable code of your own creation (e.g. in a class
file) consisting of functions returning style objects or other control
properties either based on the values supplied as parameters or on a
different function for each theme. It requires a bit of ingenuity but
at least the end result will be more system friendly and supportable.
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: kfc1976 | last post by:
Hi All, First of all, following are the facts 1) I've been trying to solve the following issue for the past 8 hours (Not Kidding) 2) If I can't find the answer, It will drive me completely crazy...
1
by: RG | last post by:
Is there a repository of themes and skins that could be downloaded from some place? Is there a visual designer for themes and skins allowing you to generate App_Themes files? Thanks in advance
5
by: Sol | last post by:
Hi Guys, I'm looking for some advice / guidelines on using Themes with an application I am working on. The application needs to allow people to customize the appearance utilizing what I would...
1
by: Griff | last post by:
We're replacing a CLASSIC ASP application. In this application, we presented a dialogue box that allowed end users to specify exactly how they wanted their screen to look. So, they could set...
4
by: Sean | last post by:
My experience now working with master pages on and off for 6 months is that they can be very dangerous when working with themes. One example in particular is the changes I made to my banner menu...
11
by: New Bee | last post by:
Hi, I have been looking at Themes and Skins today and now resonably understand how they work at a ground level. But I have a couple of questions. 1. ) StyleSheetTheme I dont understand...
2
by: mike | last post by:
Hi. I am having trouble grasping the concept of applying a consistent theme to an ASP.net website. I didn't used to like ASP because it was too hard to apply a theme from a common theme folder like...
1
by: lander | last post by:
where can I find some good-looking asp.net themes?????????? It's really time-consuming to write skins in asp.net 2.0......Where can i find some reusable skins? Thanks really!!!
2
by: Tim Royal | last post by:
With CSS being so prevalent, how common is the use of the asp.net Skins and Themes? I'm examining my methodology for setting up sites for some folks, and the idea of having using Themes seems...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.