'Build Custom Theme or Use Standard Theme in WPF

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 productivity? If there isn't, its just to dig dip into XAML and start building styles too keep for later projects.



Solution 1:[1]

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.

Solution 2:[2]

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.

Solution 3:[3]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 TheSean
Solution 2 Aren
Solution 3 SteveCav