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

The Actipro Blog

Tag Cloud

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

Latest Twitter News

May 14, 2012 at 2:50 PM
IntelliPrompt code snippet features have been added to our VS-like code editor control for #WPF and #Silverlight. http://t.co/1IchOJrr

May 10, 2012 at 9:40 PM
Our new Micro Charts control products for #WPF and #Silverlight are out now. Come build some dashboards with them! http://t.co/EEERvff0

May 7, 2012 at 6:47 AM
Today we look at bar charts, for our upcoming #WPF, #Silverlight, and #WinRT Micro Charts product. http://t.co/gxHuPS6B

May 4, 2012 at 6:25 AM
See a gallery of micro area charts in our upcoming release for #WPF, #Silverlight, and #WinRT. http://t.co/qDXGwW8B

May 3, 2012 at 6:32 AM
See a variety of line charts that are easy to make with our upcoming #WPF, #Silverlight, #WinRT Micro Charts product. http://t.co/mbkX6tJd

Twitter Follow us on Twitter

Month List

  • 2012
    • May (9)
    • 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 ActiproActipro (321)
  • RSS feed for Blog SummaryBlog Summary (15)
  • RSS feed for GeneralGeneral (43)
  • RSS feed for In developmentIn development (164)
  • RSS feed for New featuresNew features (155)
  • RSS feed for New productNew product (38)
  • RSS feed for PromotionPromotion (2)
  • RSS feed for SilverlightSilverlight (90)
  • RSS feed for Tips and tricksTips and tricks (4)
  • RSS feed for Visual Studio 2008Visual Studio 2008 (2)
  • RSS feed for Windows FormsWindows Forms (22)
  • RSS feed for Windows VistaWindows Vista (10)
  • RSS feed for WinRTWinRT (9)
  • RSS feed for WPFWPF (257)
  • RSS feed for XAMLXAML (23)

About Us

Actipro Software is a leading provider of .NET user interface controls for the WPF, 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 5 - Tinting Support

November 10, 2011 at 2:55 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.

In the last post, we looked at the various built-in themes that will ship with Actipro Themes.  In today’s post, we’ll peek at the tinting features that are included.

What is Tinting?

Tinting is ability of taking a pre-defined WPF Brush or Pen and creating a clone of the object with color changes to be more like a certain target color. 

Tint

If you take a brush and tint it towards a gray color, you end up with a grayish brush that has the saturation characteristics of the original brush.  The Actipro Themes object model that ships in our Shared Library has a number of helper extension methods that make allow you to tint any Brush or Pen.

Tinting Themes

While you can tint brush and pens individually, it’s much more useful to be able to tint large quantities of brush/pen assets at the same time.  Especially when you consider there are over 800 assets in the common asset pool for each built-in theme!

Actipro Themes supports the tinting of any theme or portion of a theme towards a certain color. This means that you can take a built-in theme like the Office Silver theme, and make it a red one instead. 

We’ve organized all of the assets in our common asset pool into numerous tint groups.  Some example tint group names are ToolBarButton and ToolBarButtonState.  Note that we have separated the actual normal button look from the “state” look, which consists of hover, checked, pressed, etc. states.  This allows you to tint the core look of the button one way, while tinting the “states” towards another.

There are nearly 100 tint groups defined for the assets in the common asset pool.  This granularity allows you fine control for things such as tinting buttons towards one color but lists towards another.

Still for most common scenarios, you want to tint a majority of the theme assets towards a color, and the “state” assets towards another.  We’ve got you covered!  We’ve wrapped up all our tint groups into tint group sets:

  • All – Contains all the tint groups.
  • ApplicationMenu – Contains the tint groups related to the Ribbon application button and menu.
  • Default – The tint groups for the default look of all controls.
  • Hyperlink – The tint groups for hyperlinks.
  • State – The tint groups for control “states” such as hover, checked, pressed, etc.

So say we want to tint the Office Blue theme towards green, but leave the “states” orange, and also tint the Ribbon application button/menu towards an Excel-like green.  We’d use this code:

   1: // Build a color-tinted theme  
   2: TintedThemeCatalog catalog = new TintedThemeCatalog("Custom", 
   3:     ThemeName.OfficeBlue.ToString(), Color.FromRgb(126, 163, 128));
   4: catalog.TintGroups.AddRange(TintGroupSets.ApplicationMenu, Colors.Green);
   5: ThemeManager.RegisterThemeCatalog("Custom", catalog);
   6:  
   7: // Apply the theme
   8: ThemeManager.CurrentTheme = "Custom";

In a handful of lines, we’ve managed to tint the entire look of our application.  Here’s the result of the Ribbon portion:

TintedRibbon

Summary

In this post we’ve seen the powerful tinting features that Actipro Themes provides.  And remember, if you are using our styles/templates for native WPF controls, the tinting will flow into those as well.

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

Related posts

Themes for WPF Part 1 - Native WPF Control Themes In prior blog posts, we’ve detailed some of the great new features coming to the WPF SyntaxEditor ...Themes for WPF Part 4 - Built-In Themes This post continues our series on the Actipro Themes being added for all our WPF controls in the u...PropertyGrid for WPF released as part of WPF Studio v4.5We're very happy to have just released PropertyGrid for WPF, a control we've been working on for sev...

Comments

January 4, 2012 at 06:59  

trackback

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-2012 Actipro Software LLC. All rights reserved.
Home Actipro Software | Products | Download | Contact Us