473,395 Members | 1,666 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,395 software developers and data experts.

"Stylesheets" in win forms

Hi all

This may seems like an od subject.
I would like to know if you can apply some sort of "stylesheet" to winforms?
like in ASP.NET you can define .css files to determine your look and feel of
your HTML web pages. the obvious advantage of using HTML stylesheets is that
all your buttons, drop downs, etc all look the same. As well as if you wish
to change something to the general look and feel of the web site, you could
just change the css and the entire web site would change.

I would like to know if something similar exists for winforms? so you have
10 forms in your application and each form has, on average, about 10
buttons. all forms must look the same, and all buttons must look the same,
and their "look and feel" controlled by one central location...

any suggestions or solutions?

Thanks
Jason
Nov 16 '05 #1
3 5070
maintain the attributes of the controls in the central location like a
config file or an xml file.
you can read those attributes and set the properties runtime.

Av.
"Jason" <c_*******@mighty.co.za> wrote in message
news:u8**************@TK2MSFTNGP11.phx.gbl...
Hi all

This may seems like an od subject.
I would like to know if you can apply some sort of "stylesheet" to
winforms?
like in ASP.NET you can define .css files to determine your look and feel
of
your HTML web pages. the obvious advantage of using HTML stylesheets is
that
all your buttons, drop downs, etc all look the same. As well as if you
wish
to change something to the general look and feel of the web site, you
could
just change the css and the entire web site would change.

I would like to know if something similar exists for winforms? so you have
10 forms in your application and each form has, on average, about 10
buttons. all forms must look the same, and all buttons must look the same,
and their "look and feel" controlled by one central location...

any suggestions or solutions?

Thanks
Jason

Nov 16 '05 #2
so in otherwords, read my styles from the central location and apply them to
my buttons, etc on formload?
this is a good option...
is there another way?

"avnrao" <av*@newsgroups.com> wrote in message
news:ey*************@tk2msftngp13.phx.gbl...
maintain the attributes of the controls in the central location like a
config file or an xml file.
you can read those attributes and set the properties runtime.

Av.
"Jason" <c_*******@mighty.co.za> wrote in message
news:u8**************@TK2MSFTNGP11.phx.gbl...
Hi all

This may seems like an od subject.
I would like to know if you can apply some sort of "stylesheet" to
winforms?
like in ASP.NET you can define .css files to determine your look and feel of
your HTML web pages. the obvious advantage of using HTML stylesheets is
that
all your buttons, drop downs, etc all look the same. As well as if you
wish
to change something to the general look and feel of the web site, you
could
just change the css and the entire web site would change.

I would like to know if something similar exists for winforms? so you have 10 forms in your application and each form has, on average, about 10
buttons. all forms must look the same, and all buttons must look the same, and their "look and feel" controlled by one central location...

any suggestions or solutions?

Thanks
Jason


Nov 16 '05 #3
Jason,

Another way to do this would be to derive from the windows forms
controls, setting the defaults to what you want them to be.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jason" <c_*******@mighty.co.za> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
so in otherwords, read my styles from the central location and apply them to my buttons, etc on formload?
this is a good option...
is there another way?

"avnrao" <av*@newsgroups.com> wrote in message
news:ey*************@tk2msftngp13.phx.gbl...
maintain the attributes of the controls in the central location like a
config file or an xml file.
you can read those attributes and set the properties runtime.

Av.
"Jason" <c_*******@mighty.co.za> wrote in message
news:u8**************@TK2MSFTNGP11.phx.gbl...
Hi all

This may seems like an od subject.
I would like to know if you can apply some sort of "stylesheet" to
winforms?
like in ASP.NET you can define .css files to determine your look and feel of
your HTML web pages. the obvious advantage of using HTML stylesheets is that
all your buttons, drop downs, etc all look the same. As well as if you
wish
to change something to the general look and feel of the web site, you
could
just change the css and the entire web site would change.

I would like to know if something similar exists for winforms? so you have 10 forms in your application and each form has, on average, about 10
buttons. all forms must look the same, and all buttons must look the same, and their "look and feel" controlled by one central location...

any suggestions or solutions?

Thanks
Jason



Nov 16 '05 #4

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

Similar topics

3
by: Phil Powell | last post by:
Has anyone here ever done a case where you have a select multiple form element and you have to do both server-side and client-side validation? I am honestly not sure how to do it in Javascript (I...
43
by: Dimitri Debruyne | last post by:
Hi group I am in the process of developing a website in XHTML Strict and CSS. Is there a way to open a link in a new window without the use of frames or Javascript or something ? I didn't find a...
2
by: Mr X | last post by:
I'm a few weeks new to JS, and am having a problem. I have a simple INTERNAL style in a web page and I know that style is working. The problem arises when I try to run a script that changes one of...
12
by: relaxedrob | last post by:
Hi All! I have a page with with the following style information: <link rel="stylesheet" type="text/css" href="/eEmployment/eTech.css" /> <style type="text/css"> DIV.Application {...
6
by: Sugapablo | last post by:
Lets say I have several DIVs, each with an ID like X1, X3424, X234, etc. I'd like to render all elements that have an ID that starts with "X" invisible (for example), regardless of what followed...
9
by: Aaron Gray | last post by:
Hi, Well I have gone and done it, got to the bottom of it. Nothing spectacular but its good to see how it is done. Now to distill the brew ... I am going to use sub threads of the thread...
6
by: Dick Watson | last post by:
I had a page that works when setup like this: === <form name="frmCalc" action=""> <script type="text/javascript"> function btnCalc_onclick(abc) { return "got here with " + abc; }
4
by: rebeccatre | last post by:
please help me with this, <style> #a, option.message {background-color: green; color: white;} #b, option.message {background-color: yellow; color: black;} </style> <select id="thisselect">...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.