Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Skinning / Themeing Custom Controls and Apps
Message
De
31/03/2008 23:42:32
 
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01307069
Message ID:
01307221
Vues:
11
>Skinning in WPF is fairly straight forward, theming is a different story. the easiest route to go is adding an external resource dictionary containing your styles and templates then loading it at runtime. This approach offers the greatest flexibility. if you are really interested check out www.codeproject.com. There are some great articles there (look for Josh Smith) on several different ways to handle this.

Good suggestion, I'd seen those before but you made me look at Josh's work a bit closer and I picked up on some ideas from that. Thanks!!! Actually at this point I've read so much, my head is swimming.

So I think I'll start at the beginning of the problem and work my way down.

Normally I subclass all the standard controls and then use the subclassed controls in my application. I've been struggling with figuring this out for WPF.

WOW I just discovered something while I was posting this that maybe should have been obvious to me, but for some reason I totally missed.

I was fighting with the concept of having to create templates for every custom control I created, and therefore having to create a custom template for every theme. I just realized you can just remove the static constructor, you no longer have to create a custom template. Duh.

And even better, it's still styleable, templateable and honors my windows theme. <g>

Well... one major problem solved. <g>

Now I need to figure out how to layout the skin library to make it both manageable and designer friendly.

Thanks again... sometimes a little shove in the right direction can make a big difference <g>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform