• Products
  • Download
  • Purchase
  • Support
  • Company
Actipro Software company logo
Twitter Follow Actipro RSS Subscribe (RSS Feed)

The Actipro Blog

Tag Cloud

  • apps
  • blog
  • charts
  • code writer
  • docking
  • editors
  • intelliprompt
  • micro charts
  • navigation
  • propertygrid
  • ribbon
  • shared library
  • silverlight
  • syntaxeditor
  • themes
  • universal
  • views
  • web site
  • winforms
  • winrt
  • wpf
  • xaml

Tweets by @Actipro

Month List

  • 2018
    • April (1)
    • February (1)
    • January (2)
  • 2017
    • December (2)
    • November (3)
    • October (1)
    • August (1)
    • July (1)
    • June (1)
    • May (1)
    • April (1)
    • March (3)
    • January (2)
  • 2016
    • December (1)
    • November (1)
    • October (1)
    • August (3)
    • July (2)
    • June (1)
    • May (3)
    • April (2)
    • March (5)
    • February (8)
    • January (2)
  • 2015
    • December (1)
    • November (3)
    • October (4)
    • August (3)
    • July (4)
    • June (2)
    • May (5)
    • April (6)
    • March (1)
    • February (2)
    • January (3)
  • 2014
    • December (2)
    • November (2)
    • October (4)
    • September (10)
    • August (2)
    • July (1)
    • June (2)
    • May (5)
    • April (3)
    • March (8)
    • February (6)
    • January (5)
  • 2013
    • December (4)
    • November (5)
    • October (7)
    • September (5)
    • August (3)
    • July (6)
    • June (6)
    • May (7)
    • April (7)
    • March (9)
    • February (2)
    • January (7)
  • 2012
    • December (4)
    • November (7)
    • October (5)
    • September (7)
    • August (5)
    • July (9)
    • June (11)
    • May (12)
    • April (6)
    • March (11)
    • February (11)
    • January (2)
  • 2011
    • December (2)
    • November (7)
    • October (2)
    • September (1)
    • August (5)
    • July (3)
    • June (6)
    • May (5)
    • April (8)
    • March (4)
    • February (5)
    • January (9)
  • 2010
    • December (9)
    • November (10)
    • October (4)
    • September (8)
    • August (12)
    • July (9)
    • June (7)
    • May (6)
    • April (7)
    • March (6)
    • February (6)
    • January (4)
  • 2009
    • December (2)
    • November (2)
    • October (12)
    • September (3)
    • August (11)
    • July (10)
    • June (6)
    • May (3)
    • April (7)
    • March (6)
    • February (8)
    • January (10)
  • 2008
    • December (10)
    • November (2)
    • October (3)
    • September (5)
    • August (5)
    • July (8)
    • June (4)
    • May (4)
    • April (10)
    • March (8)
    • February (1)
    • January (2)

Category List

  • RSS feed for SubBlog Actipro (571)
  • RSS feed for SubBlog Apps (18)
  • RSS feed for SubBlog Blog Summary (34)
  • RSS feed for SubBlog Customer Showcase (1)
  • RSS feed for SubBlog General (44)
  • RSS feed for SubBlog In development (248)
  • RSS feed for SubBlog New features (300)
  • RSS feed for SubBlog New product (79)
  • RSS feed for SubBlog Promotion (3)
  • RSS feed for SubBlog Silverlight (203)
  • RSS feed for SubBlog Tips and tricks (5)
  • RSS feed for SubBlog Universal Windows (23)
  • RSS feed for SubBlog Visual Studio 2008 (2)
  • RSS feed for SubBlog Windows Forms (46)
  • RSS feed for SubBlog Windows Vista (10)
  • RSS feed for SubBlog WinRT (95)
  • RSS feed for SubBlog WPF (424)
  • RSS feed for SubBlog XAML (50)

About Us

Actipro Software is a leading provider of .NET user interface controls for the WPF, UWP, Silverlight, and WinForms frameworks, and is most well-known for their SyntaxEditor syntax-highlighting code editor control.

Please take some time to learn more about us and our product offerings.

Themes for WPF Part 2 - Common Asset Pool

November 7, 2011 at 5:04 AM
by Bill Henning (Actipro)

BlogPostBanner

This post continues our series on the Actipro Themes being added for all our WPF controls in the upcoming 2011.2 version. 

The previous post gave an introduction to Actipro Themes and discussed how we have implemented styles/templates for native WPF controls that look great with our custom WPF controls.  In many cases, our styles/templates look the same as the related system theme.  However in some cases such as menus, toolbars, statusbars, etc. we’ve spruced things up a bit to provide a more Visual Studio-ish look for the native controls.  These customized styles/templates can be applied app-wide with a single line of code, or instead can be used on a case-by-case basis if desired.

Achieving Consistency

A main goal of Actipro Themes is to make native WPF controls in your apps look great when paired with any of Actipro’s custom controls, and when multiple Actipro products are used together.

In 2011.1 and past versions, each of our custom control products used to define their brush asset resources in their own assemblies. Since we have many product assemblies, over time this could of course lead to some inconsistent colors within a theme between multiple products.

There were cases where some brushes were duplicated such as for the non-glass Window brushes used by both Docking/MDI and Ribbon.

Finally, if Actipro products were set to use an Office theme, they would render great, however may not mix well next to native WPF controls since those would still be using the system theme.

The solution to all of these issues is to have a common asset pool.

Common Asset Pool

Our approach with Actipro Themes in 2011.2 was to consolidate all brush, thickness, etc. assets for a theme into a single place.  We call this the common asset pool.

What we’ve done is have developed well over 800 asset resources for each of the system and Office themes we support.  Then we made all of our custom control product styles/templates as well as our native WPF control styles/templates use those same assets.  You can imagine that this took quite a while to do.

BrushPool

  The benefits of using a single set of asset resources that were designed to look great together are:

  1. Actipro’s custom and native WPF control style/templates all share the same asset resources, meaning their styles, sizes, and colors will match.  In the diagram above you can see how the EditBackgroundNormalBrushKey asset is used to reference the Brush that is applied as the default background for both a native WPF TextBox as well as for Actipro SyntaxEditor.  If you now place a TextBox next to a single-line mode SyntaxEditor, you visually won’t see any difference.
  2. There is no more brush asset duplication since all assets are set in one place and reused among all Actipro products.
  3. Since Actipro’s styles/templates for native WPF controls use the common asset pool, now when an Office (or other) theme is set for an application, all native WPF controls will render in the theme alongside the Actipro controls.
  4. You can reuse any of the assets anywhere in your app to further extend the consistent themed look.
  5. You can redefine any assets globally or on a theme-by-theme basis, and those changes will flow into any styles/templates in your app that use the assets.

Reusing Assets

It’s easy to reuse any of our custom theme assets anywhere in your apps or custom controls.  The syntax is like this:

   1: <Border CornerRadius="4" BorderThickness="1" Padding="20"
   2:  Background="{DynamicResource {x:Static themes:AssetResourceKeys.ContainerMediumBackgroundNormalBrushKey}}"
   3:  BorderBrush="{DynamicResource {x:Static themes:AssetResourceKeys.ContainerBorderNormalBrushKey}}">

We’ve defined several additional helpful assets in each theme for things like container and workspace backgrounds.  There are multiple variations of each (light, medium, dark). 

ContainerAssets

You can choose which to use for various scenarios but regardless of which one you choose, everything will look great with the rest of the theme.  Several styles for native controls are also included, allowing the X button in the screenshot above to easily render similar to a standard toolbar button.

Redefining Assets

It’s easy to redefine individual assets if you don’t like our pre-defined defaults.  We have even built in a simple mechanism by which you can redefine assets only for specific themes so that if you only wanted to modify a particular asset for Office themes, you could do so.

Either way, these redefined assets can flow into all Actipro and native controls in your application.

Summary

You can see how having a common asset pool provides for visual consistency throughout your app, and we’ve further engineered things to make all assets reusable and customizable.  You won’t find a better theming system anywhere.

In the next post, we’ll take a look at the updated look we’ve created for the Docking/MDI product.

Tags: wpf, themes
Filed under: Actipro, New product, In development, WPF
Permalink | Comments (1)

Related posts

Themes for WPF Part 1 - Native WPF Control ThemesIn prior blog posts, we’ve detailed some of the great new features coming to the WPF SyntaxEditor an...Themes for WPF Part 4 - Built-In ThemesThis post continues our series on the Actipro Themes being added for all our WPF controls in the upc...Themes for WPF Part 5 - Tinting SupportThis post continues our series on the Actipro Themes being added for all our WPF controls in the upc...

Comments (1) -

November 7, 2011 at 07:46  

I'm really interested in next release of WPF Studio. I think it's will be awesome with new themes.

Good job guys!

Daniil Russia

Pingbacks and trackbacks (1)+

January 4, 2012 at 07:59  

Actipro Blog 2011 Q4 Posting Summary

Actipro Blog 2011 Q4 Posting Summary

The Actipro Blog - WPF, Silverlight, and WinForms Development

Comments are closed
Copyright © 1999-2018 Actipro Software LLC. All rights reserved.
Home Actipro Software | Products | Download | Contact Us