topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 4:24 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Writing WPF styles?  (Read 3456 times)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Writing WPF styles?
« on: September 05, 2015, 07:40 PM »
For some retro project I'm considering to develop, I could really need some Windows 3.x WPF style. Are there any? If not, how can I actually create them?

I never did that before.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: Writing WPF styles?
« Reply #1 on: September 05, 2015, 09:34 PM »
Well, to use a windows 3.1 style, you're probably going to have to supply artwork, either from someone drawing it, or finding a picture of a window that approximates what you want, and chopping it up in to the resources.  There might be a pack of images out there for it, but that would require some research to find.

As far as how to do it, there are a lot of tutorials out there.  Here are two.

http://www.codeproje...895945/Styles-in-WPF

http://wpftutorial.net/Styles.html

http://www.wpf-tutor...styles/using-styles/

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: Writing WPF styles?
« Reply #2 on: September 05, 2015, 09:36 PM »
I thought I'd crowdsource the research, not having found any on my own.  :D

Thanks. Meh, I was hoping WPF would allow me to just apply some CSS-like styling ...

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: Writing WPF styles?
« Reply #3 on: September 05, 2015, 09:39 PM »
I thought I'd crowdsource the research, not having found any on my own.  :D

Thanks. Meh, I was hoping WPF would allow me to just apply some CSS-like styling ...

It does.  But quite similar to CSS, you have to have the resources if you want to get crazy with it or use something that's not intrinsic to the page.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: Writing WPF styles?
« Reply #4 on: September 05, 2015, 09:41 PM »
CSS is a part of my job, I could perfectly live with that.  8)

Why would I need graphics when that XML-thingy just allows me to apply styles at all?

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: Writing WPF styles?
« Reply #5 on: September 05, 2015, 10:27 PM »
CSS is a part of my job, I could perfectly live with that.  8)

Why would I need graphics when that XML-thingy just allows me to apply styles at all?

Because the styles are limited to the resources that are included with windows.  There are a lot of styles included- not just the default aero.  And some companies make styles packaged.  But in the end, all they really are is graphics overlaid over the controls.  Or changes to the styles of the controls, i.e. 2d instead of 3d and adjustments in the drawing.  In order to change it wholesale, which is what a windows 3.1 skin would be, you need graphic resources.