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

Implementing a company styleguid

[sorry for 'crossposting', but m.p.d.f.w.controls has very low
activity]

Hi,

the company I'm working has got a styleguide, which we use for
web-projects. The guide should also be applicable for Windows
applications. Basicly it tells you the color, font, margins etc for
various controls. What is a suitable way for me to implement this
styleguide for our C# windows forms development?
I was thinking about creating custom My<Controlclasses, like
MyButton; MyLabel etc. and setting approriate property-values in the
overridden constructor. This approach is flawed though, if you use the
VS designer. If I set the ForeColor of a MyLabel, to Color.Blue for
instance, and add that to a Form, in the generated code section it puts

a statement setting the ForeColor. I understand this is because the
designer compares the value of the property to the default value (which

is Color.Black). No problems sofar, but if I would decide to change the

control's color to Color.Red, then none of my already added MyLabel
controls gets his ForeColor changed. To prevent this behaviour, I could

override the ForeColor property. In this case that sollution would be
sufficient, but not all properties I would like to change the default
value for, are overridable.

Is there a common approach for this?

tia
Frank Guchelaar

Oct 24 '06 #1
1 1070
For desktop application, I would suggest you should avoid enforcing a style
via code, instead relying on theming your users desktop so that basic style
or theme of windows and applications is picked up. Restricting themes is a
much better way of controlling your app style, and its easier to cater for
disabled users who need additional flxibility over colour, size etc. This
can still form part of a company wide styleguide.

http://www.microsoft.com/resources/d....mspx?mfr=true

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Dudio.nl" <fg********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
[sorry for 'crossposting', but m.p.d.f.w.controls has very low
activity]

Hi,

the company I'm working has got a styleguide, which we use for
web-projects. The guide should also be applicable for Windows
applications. Basicly it tells you the color, font, margins etc for
various controls. What is a suitable way for me to implement this
styleguide for our C# windows forms development?
I was thinking about creating custom My<Controlclasses, like
MyButton; MyLabel etc. and setting approriate property-values in the
overridden constructor. This approach is flawed though, if you use the
VS designer. If I set the ForeColor of a MyLabel, to Color.Blue for
instance, and add that to a Form, in the generated code section it puts

a statement setting the ForeColor. I understand this is because the
designer compares the value of the property to the default value (which

is Color.Black). No problems sofar, but if I would decide to change the

control's color to Color.Red, then none of my already added MyLabel
controls gets his ForeColor changed. To prevent this behaviour, I could

override the ForeColor property. In this case that sollution would be
sufficient, but not all properties I would like to change the default
value for, are overridable.

Is there a common approach for this?

tia
Frank Guchelaar

Oct 24 '06 #2

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

Similar topics

3
by: Gabriele Farina | last post by:
I guys I planned to create a new programming language to use to develop web applications for my company. I'd like to develop it using Python, but I don't know if python is fast enaught. ...
15
by: Agoston Bejo | last post by:
Hi, I'm having trouble with implementing some constraints on the database level. An example: --Table A(AID, BID ref. B.BID, ATXT) --Table B(BID, CID ref. C.CID) --Table C(CID) upon insertion...
1
by: David | last post by:
What I envision is this. The user gets a set of records in a data grid Then the user gets to select one of the rows to view the detail information about the record. Then instead of backing...
1
by: rdemyan via AccessMonster.com | last post by:
I'm trying to implement a licensing scheme. There are three types of licenses: Trial - good for 30 to 60 days Interim - good for 1 year Fully Paid - no expiration Everything is working fine...
4
by: phl | last post by:
hi, My question is: 1. To avoid possible memory leaks, when you use this pattern, after you have dealth with the unmanaged resources and before you take your object off the finalize queue,...
4
by: Vera | last post by:
Hi there! I'm a total newbie at web development, so I started bydownloading and installing Visual Web Developer 2005 Express Edition as well as SQL Server 2005 Express Edition. I also downloaded...
5
by: Shikari Shambu | last post by:
Hi, I am trying to implement a collection that implements IEnumerable<T>. I keep getting the following error 'IEnumerator<...>.Current' in explicit interface declaration is not a member of...
0
by: Maneesh Agarwal | last post by:
I am trying to pass a parameter to dynamically populate drop down list. I am not able to pass the parameter from my .aspx file. Here is the grid view and related ObjectDataSource. In srcLocation, the...
0
by: bowtie | last post by:
i would like to develop an intranet for a local company as a project at college and would like to use html and asp,and for the web server i would like to use apache,but i need assistance on how to...
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
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: 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
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:
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.