Search code examples
c#.netwpfstylesthemes

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

  • 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 already have so many themes availabe online. 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&ProjectName=wpf

    WPF Theme Selector

    http://wpfthemeselector.codeplex.com/

    Wpf Project With 21 Theme

    https://marketplace.visualstudio.com/items?itemName=AliAlikhani.SahaWpfTheme2012

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

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