Quantcast

Maximum PC

It is currently Fri Aug 01, 2014 10:09 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Skin a form? [C#/VB.NET 2010]
PostPosted: Wed Aug 04, 2010 10:19 am 
8086
8086

Joined: Tue Aug 04, 2009 3:42 pm
Posts: 20
I want to make a form-skinning library, using extension methods:
Code:
this.Skin(new BlackSkin());

and I've got the skinning part figured out - but if the user draws graphics using the Paint event, the code would break, because it would be along the lines of:
Code:
f.Paint += (object sender, PaintEventArgs e) => {
     // code in here to draw custom background, rounded edges, shadows, etc.
};

Which would overwrite anything the user drew. Plus, it would flicker.

I've made Aero-style forms for XP by having any Aero forms inherit Vista_Form but I can't really change what the form inherits from, can I?

Any ideas?


Top
  Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2010 12:44 pm 
Million Club - 5 Plus*
Million Club - 5 Plus*
User avatar

Joined: Sun Sep 12, 2004 6:37 pm
Posts: 4745
Location: In the monkey's litterbox
Are you using WinForms or WPF? (I'm guessing WinForms)


Top
  Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2010 12:57 pm 
8086
8086

Joined: Tue Aug 04, 2009 3:42 pm
Posts: 20
WinForms, of course :) I hate WPF. Plus, this is to skin Form objects, so I can't switch.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group