CODEGATOR

.NET info worth sinking your teeth into!
Welcome to CODEGATOR Sign in | Join | Help
in Search

Martin Cook

Yet another C# developer with a blog.

Separating design code from control code

I have been too busy lately earning a living to post anything interesting to CODEGATOR. I did notice a very good article by James Galasyn here that I thought I might pass along. One of the things that annoys me whenever I create controls in C# is that I constantly find myself writing the following code to separate my design-time logic from my runtime logic:
if( base.DesignMode ) 
{ 
    // Special design-time behavior. 
} 
else 
{ 
    // Run-time behavior. 
} 

James addresses this problem with an extensible framework for extending the design surface for Windows Forms 2.0 custom controls. If you write WinForm controls then the article is certainly worth a glance.

See ya!

Published Sep 11 2006, 09:09 AM by Martin
Filed under: , , ,

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit

About Martin

I work as a software engineer specializing in designing and building object-oriented business solutions for Windows platforms using C#. I have been programming professionally for roughly 20 years.

This Blog

Syndication

Terms of Service | Privacy Statement