views:

89

answers:

4

Soon to be a professional .NET developer (I hope) I start to dig into Windows Presentation Foundation (WPF). Looking into several video tutorials, I find design of GUI a daunting task. Having to specify every color, on every element, in every situation, to every platform seems a bit too much. How can you make this process simpler, and more generic when it comes to design? Is there any templates to start from, or is one expected to specify a couple of hundred rows of XAML before the design is looking appealing?

Considering the code-block below...

<Style TargetType="{x:Type Button}">
    <Setter Property="Background" Value="LightGreen" />
    <Setter Property="Foreground" Value="DarkGreen" />
</Style>

... where properties for hover and pushed-button style is left out which need additional rows of XAML to do what the developer wants.

Might there be a simple XAML-editor around to increase produtivity? If there isn't, its just to dig dip into XAML and start building styles too keep for later projects.

Thanx for listening!

+1  A: 

There is no requirement to create a Style. You can just use the default style. Consider this simple messagebox style window:

<Window x:Class="MyProject.Test"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Title="Test" Height="217" Width="298">
    <StackPanel Orientation="Vertical">
       <Label>Here is the Message.</Label>
       <StackPanel Orientation="Horizontal">
           <Button>OK</Button>
           <Button>Cancel</Button>
       </StackPanel>
    </StackPanel>
</Window>

If you really need to re-style controls, I would pick and choose which ones to do. Otherwise, yes I think creating a custom style is a pretty big task.

TheSean
I am afraid of that :) - however, it would be nice to actually do something to the boring standard styles in almost every Information System I've seen. Giv me a month - and I'll complete three different styles to use for an Information System like Windows Dynamics AX, SAP or even BaaN.To me its important to use the correct color encoding, making applikations more useful (and fun) to use. Having the user in mind I think this is of great concern.Thanx for your answer, it made me know better!
BennySkogberg
+1  A: 

Creating a custom style is a very large task, however, should you decide this is neccesary (it's not required). You can use Expression Blend to speed up the process.

Aren
I've seen the words before on Expression Blend, but never understood its full context. Having the ability to make simple sketches like balsamiq.com is a very nice feature! Thanx for the link, I'll go to MSDNAA (Academic Alliance) right away and try it out! BR -
BennySkogberg
+1  A: 

Designing your own theme is great but it requires a lot of expertise and time. From my point of view its not a great idea to invest in designing your own theme provided you have so many themes availabe for you. You can take one which suits you and modify it as per your needs.

I genrally refer these links for themes -

WPF Themes -

http://wpfthemes.codeplex.com/

http://wpf.codeplex.com/wikipage?title=WPF%20Themes&amp;ProjectName=wpf

WPF Theme Selector

http://wpfthemeselector.codeplex.com/

You can get some here -

http://www.wpfstyles.com/Default.aspx

In case you need more options you can buy one here -

http://www.xamltemplates.net/wpf-themes/

akjoshi
Thanx for these awesome links. Especially wpfstyles.com looks very nice - I'll try it out later today.
BennySkogberg
+1  A: 

Reuxables have a couple of free themes you can try. We've just bought one of their non-free ones and it's dead easy, you just throw in a reference in your app.xaml and it transforms your app. Easy to tailor, too.

SteveCav
Thanx for the link! It looks very nice. - I think it might be an idéa to actually buy themes, since you get a starting point for a fair amount of money.
BennySkogberg