WPF Themes

An updated collection of seven themes replaces the original nine WPF Themes. Some of the issues with the original themes have been addressed in this update. Download the WPF Themes in the WPF Futures release. This collection of themes can also be found in the Silverlight Toolkit.

WPFThemesV2.jpg

How to Use the WPF Themes

How to use the WPF Themes in your application:

Resource dictionary You can use the themes as a resource dictionary. Add the xaml file of the desired theme to your project (in Visual Studio, right-click on the project in the Solution Explorer, choose Add --> Existing File and select the appropriate .xaml file) and make sure your project also includes a reference to WPFToolkit.dll (the themes depend on VSM). In App.xaml, add a reference to the desired theme to the Application.Resources. For example,

<Application x:Class="ThemesSample.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="Window1.xaml">
    <Application.Resources>
        <ResourceDictionary Source="ExpressionDark.xaml"/>
    </Application.Resources>
</Application>

Themes Quick Reference

Expression Dark Thumbnail Expression Dark Expression Light Thumbnail Expression Light Whistler Blue Thumbnail Whistler Blue
Shiny Red Thumbnail Shiny Red Shiny Blue Thumbnail Shiny Blue Bureau Blue Thumbnail Bureau Blue
Bureau Black Thumbnail Bureau Black

Last edited Sep 23, 2009 at 10:33 PM by JenniLe, version 6

Comments

IgalKroy Wed at 6:11 AM 
Hi,
I have a warning notification upon refreshing items in a ListView as follows:
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='DisabledBorderBrush'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='DisabledBackgroundBrush'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='DisabledForegroundBrush'

I have seen that the resources are in place, what might be causing the problem?

Igal

mojtaba_sarooghi Jul 30, 2013 at 12:52 PM 
Hi,
Thank you for nice themes, I just used and tested it
------------
about ComboBox showing wrong text (data type instead of your binding)
in comboboxitem template Content="{TemplateBinding Content}" and ContentTemplate="{TemplateBinding ContentTemplate}" should be deleted.!!!
means
<ContentPresenter
x:Name="contentPresenter"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}"/>
should be replaced with
<ContentPresenter
x:Name="contentPresenter"

HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}"/>
I do not know why :-) but this is not working even with default Microsoft ComboBoxItem template

santhosh Jul 18, 2012 at 10:53 AM 
Check the scrollbar menus. Not properly visible. Window background and menu foreground made them unreadable. Also the positions are wrong. Win 7

rdamborsky Jun 26, 2011 at 9:01 AM 
@bartivo, @m_black and for others who struggle with ComboBox and wrong text (data type instead of your binding) being displayed (BureauBlack)... I solved this issue using following XAML:

<ComboBox Name="comboBox1" ItemsSource="{Binding Source={StaticResource YourObjectsSource}}" SelectedValuePath="IdPropertyOfObject">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=TitlePropertyOfObject}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>

he00273 Mar 11, 2011 at 9:08 AM 
I expanded the demo application by adding a Grid first and then testing with DarkExpression and ShinyRed themes. The Grid behaved as expected.

When I placed the Grid inside an Expander it compressed the TextBoxes inside the Grid but only with ShinyRed. DarkExpression was not affected. I prefer ShinyRed however.

If anyone can explain why these behave differently and how to fix the ShinyRed theme it would be appreciated. The differences can be seen here.

I had a look at the source but the level of complexity is very high.

DarkExpression
http://www.freeimagehosting.net/uploads/317a0132fc.png

ShinyRed
http://www.freeimagehosting.net/uploads/5c35a66ad6.p

he00273 Mar 11, 2011 at 9:05 AM 
Themes are al very nice but at times one would like to tweak some of the effects. Like for a TextBlock I want to right justify the text, set the font weight to bold, increase the fontsize etc. I only want to do this for some user controls not everywhere.

What is the easyiest way to tweak some settings. If I apply a new Style for some controls, it usually overrides all the nice theming. I only want to override some attributes not replace them.

Any clues very much appreciated.

he00273 Mar 10, 2011 at 2:54 AM 
Using the RedShinyTheme (With some brush colours modified).
When I use a grid in the InnerContent of an Expander, the grid does not use all the space available (at least that what it looks like) hence grid cells with a TextBox does not render well. See http://www.freeimagehosting.net/uploads/4f70bed95e.png

If I comment out the theme, it is rendered as expected but of course without the theme colour content and animations
see http://www.freeimagehosting.net/uploads/10477a97f3.png
I tried editing the theme but for someone new to WPF its a bit daunting.

I can specify a MinWidth as a work around but would rather WPF handle the sizing fo me
Any advice on how to rememdy this?

Ablokha Dec 16, 2010 at 11:06 AM 
When will be added themes for Datagrid? Or where can I download themepack for main controls and datagrid?

jwhynot Dec 10, 2010 at 5:05 PM 
I have been trying to use a ListBox with a WrapPanel and grouping but it was not working when using WPF Themes. The issue is that a StackPanel is coded into the ListBox's control template. In order to get the proper presentation, the control template should have the StackPanel replaced with an ItemPresenter such as: <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>. I have also removed the grid and placed the ScrollViewer as a child of the border.

bartivo Dec 1, 2010 at 7:26 PM 
Hi,

Has anybody solved problem with displaying datatype in combobox list instead of list value when binding to datasource?

Regards

warloki Nov 2, 2010 at 1:03 PM 
Hello,
I want to report a bug with ListView control.
Now it is implemented to support only GridView for ListView control.
<ScrollViewer Padding="{TemplateBinding Padding}" Style="{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
If you will set any other custom view, scroll viewer will always draw header row (as it draws for GridView).
Lines above are set for ListView.Template.
Maybe you could help me to solve somehow this problem, because now the only solution is to avoid using style for ListView control.

draxtor Sep 19, 2010 at 2:37 PM 
I have problem when I apply grouping to ListBox. When I exclude theme everything works fine, otherwise it doesn't show the grouping columns

RedGlyph Aug 29, 2010 at 11:34 AM 
@Nacimota: I think there are a few things to take from those themes but indeed, they are not working correctly for the most part.

I'm not sure which version to WPF they should be used with anyway, since there haven't been updates on this site for ages, nor does it provide the complete WPF sources...

Nacimota Aug 6, 2010 at 10:21 PM 
Is anyone else having a huge problem getting these themes to look right?

isaaclondon Jun 15, 2010 at 11:01 PM 
This is a good start. The biggest problem I have is because it uses styles directly, as soon as I want to put my own styling on a control to set e.g. margins etc. within a page, I lose all my styling. Is there a way around this?

galastur May 31, 2010 at 3:00 PM 
Hi,

I am totally new in WPF...is there any tutorial I can read to know how I can use these themes in my WPF app? I found one that ruigrober suggested but it is not longer available ( http://dotnet.org.za/rudi/archive/2008/11/07/wpf-themes-update.aspx )

Thanks

BayStallion Mar 12, 2010 at 11:21 AM 
Great job, thank you for the themes!
However, I noticed one thing: when I apply BureauBlue theme, all top-level menu items become visibly wider - too wide, IMO, and submenus become too narrow - just enough space to fit the text of each menu item within it and no extra-space on the left for command icons. Can this be overridden somehow?

Lito Mar 9, 2010 at 2:47 PM 
First of all, thanks a lot for making these themes available.

I do observe a display problem with ListBoxes that are bound like this: lbxCustomer.DataContext = customers where customers is a List<Customer>. The listbox items are displayed as the literal "DAL.Customer" as opposed to Customer.CompanyName when using WhistlerBlue, BureauBlue and BureauBlack. But there's no problem with ExpressionDark, ExpressionLight, ShinyBlue and ShinyRed.

Is this a known issue or am I missing something?

hummerd Feb 27, 2010 at 8:51 AM 
Great themes, but a lot work to do ))

I discovered that using StackPanel in template for ListBox dramatically decreases performance.
(I have listbox with 3000 items with complex datatemplate). So replaced it with ItemsPresenter like it is done in standart themes.

<Style TargetType="{x:Type ListBox}">
...
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Grid>
<Border x:Name="Border"...>
<ScrollViewer Margin="1" Focusable="false" Foreground="{TemplateBinding Foreground}">
<ItemsPresenter Margin="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
<!--<StackPanel Margin="2" IsItemsHost="true" />-->
</ScrollViewer>
</Border>
<Border x:Name="DisabledVisualElement" ... />
</Grid>

Can anyone explain why StackPanel in this case is so slow?

quillaja Feb 7, 2010 at 11:50 AM 
To WPF people: I'm sure you're busy, and I appreciate the work you've done so far, but all the WPF extras are pretty disappointing. The WPF toolkit lacks a lot of the really cool controls that the Silverlight Toolkit contains. Then there's this fiasco with your theme files here, which are rife with mistakes and weird quirks that we have to 'hack' to make work. Why are themes on WPF such a pain in the butt? When I first heard about WPF supporting themes, I thought it would be as easy as "App.Theme.Load("mytheme.xaml");".... but no. Come on WPF people!

SamStealth Feb 1, 2010 at 5:46 PM 
if you had the same problem like me, getting no visible output int ListView,
just use "CellTemplate" in "GridViewColumn" definition like this:

<ListView Name="listView1">
<ListView.View>
<GridView>
<GridViewColumn Header="Header1" CellTemplate="{StaticResource ItemTemplate}" />
</GridView>
</ListView.View>
</ListView>

devman81 Nov 23, 2009 at 3:36 PM 
Has anyone styled the listview by any chance? :o)

yagimay Nov 6, 2009 at 12:28 AM 
Hi, is there any updates on the WPF theme support Calendar and DataGrid?
The latest news I heard was 2009 Q3 (http://wpfthemes.codeplex.com/), thanks.

bittondb Oct 23, 2009 at 7:49 PM 
Nevermind. I looked at the code in Reflector. I see the reference to Aero.NormalColor in the code. However, how would we apply ShinyBlue.xaml to the DataGrid?

bittondb Oct 23, 2009 at 7:38 PM 
In order to get the DataGrid to pickup the _Aero_ theme, you need this:

<ResourceDictionary xmlns:tk="clr-namespace:Microsoft.Windows.Controls;assembly=WpfToolkit"
xmlns:sys="clr-namespace:System;assembly=mscorlib">

<!--Enable aero theme on toolkit components-->
<sys:String x:Key="{ComponentResourceKey
TypeInTargetAssembly={x:Type tk:Calendar},ResourceId=Theme}">
Aero.NormalColor</sys:String>

<sys:String x:Key="{ComponentResourceKey
TypeInTargetAssembly={x:Type tk:DataGrid},ResourceId=Theme}">
Aero.NormalColor</sys:String>

<sys:String x:Key="{ComponentResourceKey
TypeInTargetAssembly={x:Type tk:DatePicker},ResourceId=Theme}">
Aero.NormalColor</sys:String>

</ResourceDictionary>

What is I'm using the ShinyBlue.xaml file?

GeekByHeart Oct 20, 2009 at 7:45 PM 
You can get the background color issue fixed by doing a few "tweaks".
First, Use Background="{DynamicResource WindowBackgroundBrush}" for each window that needs the theme background color.
Second, fix the Windowbackground brush in the theme files.
e.g.
ExpressionDark theme => <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FF000000" />
Expression Light theme => <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFD6D6D6" />
Bureau black theme => <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FF333333" />
Shiny Red =>
<Color x:Key="WindowBackgroundBrushGradient1">#FF601818</Color>
<Color x:Key="WindowBackgroundBrushGradient2">#FFAF231E</Color>
<Color x:Key="WindowBackgroundBrushGradient3">#FFF1BCBE</Color>
<LinearGradientBrush x:Key="WindowBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="{StaticResource WindowBackgroundBrushGradient1}" Offset="0.0" />
<GradientStop Color="{StaticResource WindowBackgroundBrushGradient2}" Offset="0.5"/>
<GradientStop Color="{StaticResource WindowBackgroundBrushGradient3}" Offset="1.0"/>
</LinearGradientBrush>
You can do similar modifications for other themes as well

GeekByHeart Oct 20, 2009 at 7:43 PM 
I got the background color issue fixed by doing a few "tweaks".
First, Use Background="{DynamicResource WindowBackgroundBrush}" for each window that needs the theme background color.
Second, fix the Windowbackground brush in the theme files.
e.g.
ExpressionDark theme => <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FF000000" />
Expression Light theme => <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFD6D6D6" />
Bureau black theme => <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FF333333" />
Shiny Red =>
<Color x:Key="WindowBackgroundBrushGradient1">#FF601818</Color>
<Color x:Key="WindowBackgroundBrushGradient2">#FFAF231E</Color>
<Color x:Key="WindowBackgroundBrushGradient3">#FFF1BCBE</Color>
<LinearGradientBrush x:Key="WindowBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="{StaticResource WindowBackgroundBrushGradient1}" Offset="0.0" />
<GradientStop Color="{StaticResource WindowBackgroundBrushGradient2}" Offset="0.5"/>
<GradientStop Color="{StaticResource WindowBackgroundBrushGradient3}" Offset="1.0"/>
</LinearGradientBrush>
You can do similar modifications for other themes as well

GeekByHeart Oct 20, 2009 at 7:41 PM 
I got the background color issue fixed by doing a few "tweaks".
First, Use Background="{DynamicResource WindowBackgroundBrush}".
Second, the Windowbackground brush in most of the theme files need to be corrected.
e.g.
ExpressionDark theme => <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FF000000" />
Expression Light theme => <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFD6D6D6" />
Bureau black theme => <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FF333333" />
Shiny Red =>
<Color x:Key="WindowBackgroundBrushGradient1">#FF601818</Color>
<Color x:Key="WindowBackgroundBrushGradient2">#FFAF231E</Color>
<Color x:Key="WindowBackgroundBrushGradient3">#FFF1BCBE</Color>
<LinearGradientBrush x:Key="WindowBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="{StaticResource WindowBackgroundBrushGradient1}" Offset="0.0" />
<GradientStop Color="{StaticResource WindowBackgroundBrushGradient2}" Offset="0.5"/>
<GradientStop Color="{StaticResource WindowBackgroundBrushGradient3}" Offset="1.0"/>
</LinearGradientBrush>
You can do similar modifications for other themes as well

Mordy Oct 15, 2009 at 2:33 PM 
Probably not the right way to do it but I solved the white background thing by adding Background="{StaticResource NormalBrush}" to each window, I also had a similar problem whereby label styles weren't being applied unless I copied the label style from the theme file into the window resources itself...can't see anything wrong with the xaml in the theme.xaml file but it wasn't applying to the label controls on my page. This is my first WPF app though so I'm more than likely missing something obvious.

Mordy Oct 15, 2009 at 12:49 PM 
I'm having the same problem as Alex_Kofman, I can see references to Method 1 and Method 2 in previous comments but can't tell what they refer to...Also it's been very quiet in here, has this project been moved/incorporated into something else?

Alex_Kofman Oct 1, 2009 at 12:33 PM 
I have one problem. I add resource dictionary with theme xaml-file to app.xaml and add reference to WPFToolkit.dll. When I run my application it shows colored text boxes and buttons, but window is still white. Where is my mistake?

May be there is some sample application, where I can see how to use themes correctly.

MihaMarkic Sep 10, 2009 at 9:39 AM 
How does one switch themes using assemblies (no theming XAML allowed in project)? I tried with merged resourcedictionary:
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/System.Windows.Controls.Theming.WhistlerBlue;component/themes/theme.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

Looks like resource is found but I get key null exception thrown at me by BamlRecordReader. Any idea?

allanob Sep 4, 2009 at 5:33 PM 
Is there a roadmap for the Toolkit´s Controls, DataGrid....? Would it be soon?

Thanks.

nmehta6 Aug 13, 2009 at 5:12 PM 
I love these themes and planning on using one of them for a Touch Application. I need the controls to be big enough for finger touch. Is there a simple way to just 'Magnify' these controls? This may be a naive question but I am fairly new to XAML and WPF. Thanks.

Mdrasool Aug 10, 2009 at 10:37 AM 
i meand DLL

Mdrasool Aug 10, 2009 at 10:37 AM 
how to apply theme controls to whole application

maqinfo Aug 4, 2009 at 3:26 PM 
When I add the theme file .xaml file, it gives me error of missing references like System.Windows.Controls etc ,I have added wpftoolkit reference also. Which references i am missing and where can i find these dlls. My project is of wpf and not silverlight

The XAML theme error shows error in the following
xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
xmlns:input="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input"
xmlns:controlsPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls"
xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
xmlns:dataPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
xmlns:visualizationToolkit="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
xmlns:chartingPrimitivesToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting.Primitives;assembly=System.Windows.Controls.DataVisualization.Toolkit">

Ravadre Jul 27, 2009 at 2:55 AM 
Hi, I've found a bug in ListBox / ListBoxItem in Expression Dark theme. Setting HorizontalContentAlignment to any value in ListBox has no effect on items inside, I've fixed it by adding line
<Setter Property="HorizontalContentAlignment" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBox}}, Path=HorizontalContentAlignment}" />

at line 733 (Style for ListBoxItem). It looks like it's working now. Any other idea how it could be fixed? (I don't like using FindAncestor etc., I always have a feeling that I'm doing something wrong when I use it :) ).

dibzee Jul 22, 2009 at 10:16 AM 
Please include the UXMusingsRoughGreen and UXMusingsRoughRed themes again - the users loved them! [Included in a previous release]

Some of the themes are also showing databound content incorrectly - calling ToString() on the bound objects, rather than using the binding paths. I've corrected it locally but would be helpful if it was corrected in the release.

nelsonfsr Jul 16, 2009 at 9:12 AM 
@DonBurnett @Maxi247
To show horizontal orientation on ListBox, add the following code inside the ListBox definition in you form:
<ListBox.Resources>
<Style TargetType="{x:Type ListBox}">
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.Resources>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel
Orientation="Horizontal"
IsItemsHost="True" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
Hope it helps.

Nanjundappa Jul 15, 2009 at 12:23 PM 
Hi folks , the above said problem is solved. When ever you wrap your XAML under the themes tag do giva aname to it , say for example
<expression:ExpressionDarkTheme x:Name="xxx">
<!-- here goes ur container XAML... -->
<expression:ExpressionDarkTheme>.

Maxi247 Jul 13, 2009 at 2:15 PM 
Hi Why Not ListBox style be VirtualizingStackPanel

Nanjundappa Jul 10, 2009 at 7:05 AM 
I am getting the following error when running vs package "Cannot find type 'System.Windows.Controls.Theming.ExpressionDarkTheme'. The assembly used when compiling might be different than that used when loading and the type is missing. Error at object 'MainBorder' in markup file " .
I have the usercontrols defined in seperate assembly, i have added reference to the WPFtoolkit.dll , System.Windows.Controls.Theming.dll and the System.Windows.Controls.Theming.ExpressionDark.dll. even I tried adding the same dlls references in the package too. Any Idea what's wrong I am doing here?

rolek Jul 3, 2009 at 4:50 PM 
The sample shows that theming container has a background. However, this background is not included in the theme xaml. It would be nice having in under the same key for all themes. (or source code for the sample application and theming assemblies - cant find that).

DonBurnett Jun 29, 2009 at 2:44 PM 
Really silly question but when I apply one of these themes to either my regular horizontal listbox or horizontal simplestyles listbox (either it doesn't matter). My listbox loses it's Orientation=Horizontal making these really not all that useful for my application. Any ideas of how I can override this problem. Also my filled background on the listbox item seems to have mouseover events, the fill is gone and mousever causes the listbox items to GLOW (using the themes I have tried including Expression Dark).

oskarh Jun 17, 2009 at 8:38 AM 
Found yet another bug in the themes, at least in Whistler Blue (havn't checked the others): In the Style for MenuItem, the ControlTemplate is missing the textblock for displaying possible input gesture text (set when using a command on the menu item). The following element is in the original control template definition and should be in whistler blue as well:

<TextBlock Margin="5,2,0,2" x:Name="InputGestureText" Grid.Column="2" Text="{TemplateBinding InputGestureText}" />

KasperinK Jun 12, 2009 at 5:31 PM 
BTW, thank you guys so much for these. The work you have done is just amazing. You get a greater appreciation for it when you have to walk through all of them making them work just right for you. It is interesting, it seems that different themes were made by different people. You can see a difference in styles of coding between them. Anyways thank so much, let us know if you get those other two themes working.

KasperinK Jun 12, 2009 at 5:21 PM 
You can change these at run time in the code behind like this:

Dim strUrl As String = "Pack://application:,,,/myProject;Component/ThemeResources/BlueTheme/BureauBlueTheme.xaml"
Dim sbURI As Uri = New Uri(strUrl, UriKind.Absolute)
Dim rcDctnry As New ResourceDictionary
rcDctnry.Source = sbURI
myGrid.Resources = rcDctnry

KasperinK Jun 12, 2009 at 5:17 PM 
For anyone who doesn't know you can make these work with your custom controls as well so if your company uses controls that are called like; CoNmTextBox, CoNmCheckBox, CoNmExpander and so forth, you can just copy the whole style and change the TargetType in both the Style and the ControlTemplate, like below.

<Style TargetType="{x:Type myCo:CoNmTextBox}">
<Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="AllowDrop" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type myCo:CoNmTextBox}">
<ControlTemplate.Resources>
...............

And be sure to add your namespace at the top:

xmlns:myCo="clr-namespace:myCompany.UI.WPF.Controls;assembly="

KasperinK Jun 12, 2009 at 5:08 PM 
Joe is right about the trigger property however they are not all CheckedTrue and CheckedFalse some themes use CheckedOn and CheckedOff in any case just use the same thing they did in code but like Joe said switch the IsChecked property to True and make the Enter action True 0r On and make the Exit action False or Off, so basicly it was just all wrote backward. You can still keep any x:Name as well but switch them as well. For example in ExpressionLight they have the checkedTrue_Storyboard for the exit action and it should be for the enter action. And there isn't one for the enter action which again should be your exit action but you can just add it. So it should look like this:
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource CheckedTrue}" x:Name="CheckedTrue_BeginStoryboard"/>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource CheckedFalse}" x:Name="CheckedFalse_BeginStoryboard"/>
</Trigger.ExitActions>

KasperinK Jun 12, 2009 at 5:00 PM 
For anyone he needs to know, if you want to change the background in the expanders so that it is easier to see or so it matches the rest of your background (just make it transparent) you need to change the background property in the style for target type expander inside the Border that contains the contentPresenter. You could change the resource itself but that would cause any other control that used that resource to get changed as well.

KasperinK Jun 11, 2009 at 7:25 PM 
Please, has anyone figured out a work around to get the BubbleCream and TwilightBlue to work and not throw the error message about the VisualStateGroup? I really need to get the TwilightBlueTheme working. PLEASE! Anyone! It is June and there is no comments about a resolution or work-around yet.

zoltek Jun 10, 2009 at 12:33 PM 
Themes doesn't work when i use new WPF 3.5 SP1 Feature: (ItemControls) Alternating Rows.

Marinus May 26, 2009 at 2:06 PM 
Hmm... I managed to change the theme in runtime using Application.Current.Resources.MergedDictionaries.Add(themeDict);....
But, how to change the background as well?
Or.. which backgrounds do the different themes use?
Thanks in advance.

ml_black May 25, 2009 at 1:35 PM 
I've wrapped a control containing a ComboBox in it with WhistlerBlue. Not all the style elements seem to be applied (i.e. I get the curved corners but not the right color on the box and there is no MouseOver change). In addition, it breaks the display of my binding slightly, which is to a custom object, where I've set these properties: ItemsSource=<binding to an ObservableCollection of the object>, DisplayMemberPath=<a string member of the object>, SelectedValuePath=<an integer member of the object>. So when I don't have the theme applied, I see the string values from the object. When I do apply it, I see instead the object data type.

SamanthaMSFT May 21, 2009 at 6:33 PM 
Hi shaggygi, there are currently some bugs with using the WPF Themes in VS 2010 Beta 1. I was able to get them to work using method 2 above, applying them as a resource dictionary in App.xaml. Method 1 appears to throw an exception and we haven't figured out why this is yet. The themes are "officially" supported only for the controls in .NET Framework 3.5 SP1 I believe, and do not work for the DataGrid, Calendar, and DatePicker (though you should be able to extend them yourself to work with these controls). We would like to eventually extend the themes to work with the new controls, but we haven't been resourced to do this yet and do not have a date for when this might be available in the future. Thanks!

shaggygi May 21, 2009 at 12:58 AM 
Can you release a walkthrough on how to use WPF themes in VS 2010 Beta 1? Also, are the newly added WPF Toolkit controls ( DataGrid, Calendar, DatePicker ) supported with WPF themes in VS 2010 Beta 1? Mark Wilson - Thomas was going to check into this, as well. Thanks in advance.

SamanthaMSFT May 18, 2009 at 7:03 PM 
The themes do not currently work with the Ribbon control. The Ribbon themes match the Office 2007 Blue, Black, and Silver looks and do not correlate with the themes in the WPF Theme pack. I would think that the WPF Themes would be expanded in the future to work with Ribbon, but I don't believe we have any set plans for that at the moment. In the interim, Ribbon V1 will have better support for skinning through some new APIs, so you may be able to use those new APIs to apply some of the same colors and styles which are used in the WPF Themes.

Marinus May 18, 2009 at 7:45 AM 
Can you use this themes in combination with the Ribbon-control?
The Ribbon-control has his own themes. Do they match with the WPF-Future-themes or will they match in the future...?

Marinus May 15, 2009 at 1:08 PM 
I managed to change the theme in runtime using Application.Current.Resources.MergedDictionaries.Add(themeDict);....
But, the Background only changes when choosing ExpressionDark.
How to change the background as well?
Or.. which backgrounds do the different themes use?
I see that there are several questions about this...
Thanks in advance.

kkaila May 14, 2009 at 8:49 PM 
Need to update the Trigger property IsEnabled (with Value = "True") so controls like the button can be enabled and disabled dynamically through code and keep their existing properties. If you look at BureauBlue for example. you can see that there are no settings when you want to re-enable a button.

shaggygi May 14, 2009 at 2:01 PM 
Is there a way to use the themes for application, but not apply to certain controls? Meaning, I do not want to use the theme for DatePicker since it is not currently supported. When using the themes, it makes the DatePicker control dim and can not see the days on calendar. Thanks in advance.

zoltek May 8, 2009 at 12:32 PM 
How can i change items font color on ListView + Buraeu Black?

evandrofranca May 5, 2009 at 4:17 PM 
when I use the second option,
all components are adjusted to the theme,
only the background is white,
how to adjust the backgroud?

Pym May 5, 2009 at 12:23 PM 
I don't know for the others themes, but there is a bug with WhistlerBlue. You should remove ContentAlignment properties for TabItem at lines 2771 & 2772.

JoeGershgorin May 2, 2009 at 8:49 PM 
To fix the ExpressionDarkTheme checkbox at runtime (still wonky in Blend designer surface) change the checkbox definition in the XAML source (ExpressionDark.xaml):

1.) Delete the "<Trigger Property="IsChecked" Value="false">" trigger section.

2.) Add use this trigger instead:
---------
<Trigger Property="IsChecked" Value="true">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource CheckedTrue}"/>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource CheckedFalse}"/>
</Trigger.ExitActions>
</Trigger>
---------

JoeGershgorin Apr 30, 2009 at 9:49 PM 
Anybody else have issues with method 1 breaking the designer in Blend 3 Preview? It errors out with and "Invalid XAML" error on the design surface, the specific Error it spits out is:

The name "ExpressionDarkTheme" does not exist in the namespace
"clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.ExpressionDark".

However it compiles/run fines, and doesn't complain at all in the VS 2008 designer.

southsouth Apr 30, 2009 at 2:28 PM 
there is bug in ExpressionDark. When I apply the ExpressionDark theme, the checked checkBox is not checked.
But for other theme such as UXMusingsBubblyBlue or UXMusingsGreen the checked checkBox is still checked.
I guess the later using VisualStateManager, Does anybody have a VisualStateManager version for ExpressionDark.

Thanks!
Steve

bbrian Apr 24, 2009 at 6:36 PM 
Is it possible to wrap a panel with the theme, but then exclude a control in the panel from the theme? I have a grid inside of a stackpanel that needs a gradient background and the background of the control (grid) is being overwritten by the theme.

slaouist Apr 16, 2009 at 9:31 PM 
Hey gamzu,

We are working toward consolidating the static resources naming conventions and our next releases should consolidate these names.

Thanks,
Mehdi

slaouist Apr 16, 2009 at 9:15 PM 
Hello Frank, Bureau Themes are actually inspired and mimic closely the Office 2007 themes. I invite you to check them out.

shaggygi Apr 14, 2009 at 4:47 PM 
What is the roadmap to adding new WPF Themes to WPF Toolkit controls ( Datagrid, DatePicker, etc )? Are we going to have to wait until VS10 and .NET 4 or releases before then? Thanks

gamzu Apr 10, 2009 at 2:33 PM 
Is there a reason why the themes aren't consistent with their namings in the xaml files? I was thinking it would work like a theme would define some basic colors/brushes, and then use them to style the rest of the theme, so then it would be possible for me to use these basic colors/brushes in my own window styling, but hardly any of the themes have the same naming conventions and organization for the basic colors. Other than that, nice work!

SamanthaMSFT Apr 9, 2009 at 5:08 PM 
Hi Frank, we don't currently have any plans to do this, but I'll certainly make a note of your request. Thanks!

frankschuette Apr 9, 2009 at 5:21 AM 
Hi Samantha,
will there also be Office 2007 themes supporting all built-in controls (not only the ribbon) in near future ?

Thanks, Frank

MikeyTT Apr 8, 2009 at 6:47 PM 
I've also found that if I have a button in XAML that has an image object within it e.g.
<Button>
<Image source"animage.png" />
</Button
If I set the buttons IsEnabled to false then the image disappears. But when you set the IsEnabled back to true it's still gone. Is this something I'm doing wrong? As with the above post maybe too. I'm pretty new to XAML, WPF and C# for that matter. Although I used to develop in good old Turbo Pascal many a moon ago.

Thanks, Mike...

MikeyTT Apr 8, 2009 at 5:16 PM 
Am I missing something?? When you set the IsIndeterminate setting to true on the ProgressBar all is Ok, but when you set it back to false it doesn't stop the animation. Without the template(s) applied I get the behaviour I expected. Is there something I'm missing or is it an oversight in the themes??
Thanks, Mike...
BTW Excellent themes. Have really helped me understand theming and overriding templates (if that's the right terminology) a great deal.

zebow Apr 8, 2009 at 1:37 PM 
These are fantastic.
I have a question too. I have setup my outter grid using one of the themes and all of the controls inside follow the theme. In one of the of the sections of my sub grid, I have a List View with a custom data template. This List View's ItemTemplate is not using the custom data template - but the theme's. Is there a way to override the theme in one sub section of the grid. If I remove the theme reference at the grid level the custom data template works fine.

SamanthaMSFT Apr 7, 2009 at 12:11 AM 
Hi mlernarz. Yes, I think at some point we'll definitely want to expand the themes to include the new controls. However, to my knowledge there hasn't been a date set to complete this work.

About the checkbox issue and the errors in BubbleCreme & TwilightBlue, I've got the team that built the themes looking into this and someone will get back to you about it soon.

mlenarz Apr 6, 2009 at 7:50 PM 
Awesome!

@daggmano: Yeah, I noticed the checkbox initial value things too - I had to manually set the checkbox as checked in the code-behind.

@Samantha: Is there any chance that the themes will be expanded to include controls within the wpf toolkit - like the datagrid, date-picker, etc? I like the provided themes, but would like to keep the UI consistent across all controls...

daggmano Apr 3, 2009 at 3:50 AM 
Fantastic! Only one issue I have found - on some of the themes, an initially checked CheckBox does not show as checked. See CheckBox2 on the examples above - I presume they all should be checked?

dcveeneman Apr 2, 2009 at 3:20 PM 
Standing ovation on this one--this is great!

thotved Apr 2, 2009 at 9:31 AM 
There is also a problem when I change IsEnabled on for example a TextBox. The style doesn't get updated, so if the TextBox's font was 'greyed out' in the beginning it doesn't change to black when the TextBox.IsEnable is set to true... What could I do to fix this?

thotved Apr 2, 2009 at 9:04 AM 
I get the same error message as Paley: "The attachable property 'VisualStateGroups' was not found in type 'VisualStateManager'" in BubbleCreme.xaml and TwiLightBlue.xaml. It worked with the other themes though..
I have a reference to WPFToolkit.dll and System.Window.Controls.Theming.dll.
This is the line that fails: <vsm:VisualStateManager.VisualStateGroups>

Anyone know the reason to this?

mwhouser Mar 31, 2009 at 3:53 PM 
So using method 2 requires a non-theme-friendly method of making the controls appear correct?

Paley Mar 30, 2009 at 7:10 PM 
Samantha, yes it has a reference to WPFToolkit.dll - I am using the 2nd method (Application.Resources) to use the themes.

SamanthaMSFT Mar 30, 2009 at 6:07 PM 
mwhouser - In the sample application, we used Method 1 to get the gradient backgrounds. It's structured like the example above so that the theme container is wrapping a stack panel which holds all of the controls, and the stack panel gets the nice background.

Paley - Does your application include a reference to WPFToolkit.dll? It sounds like the project isn't finding VSM properly.

Paley Mar 30, 2009 at 9:32 AM 
I have tried to use themes but I get the following error:

The attachable property 'VisualStateGroups' was not found in type 'VisualStateManager'

It occurs several times in the BubbleCreme.xaml (I haven't tried the others)

mwhouser Mar 27, 2009 at 9:02 PM 
I am using method 2 of including the them in a test app.

But my window background is white, so the checkbox text is white on white (ie. cannot be seen). How do I get the nice gradients you have in the image as my window background? I could hardcode the colour, but that's not theme friendly.

Thanks,
...Matt

rahulsinghleo Mar 26, 2009 at 2:34 PM 
HI! Samantha,

I have managed to load the resource at runtime and play with all the Themes.

Thanks
Rahul Singh

rahulsinghleo Mar 26, 2009 at 2:34 PM 
I agree with you i had to change the xmal file. Don't need to specify these stuff. any way the themes stuff is very good.

Thanks
Rahul Singh

oskarh Mar 26, 2009 at 12:43 PM 
It seems like some of the themes (WhistlerBlue, BureauBlack, BureauBlue) sets HorizontalContentAlignment and VerticalContentAlignment for TabItem to Center. Some other themes (TwilightBlue, BubbleCream) sets the properties to Stretch and the last themes (ShinyBlue, ShinyRed, ExpressionLight, ExpressionDark) leaves the property out (default WPF is Stretch)

I think all themes should leave these properties out completely making the TabItem have its content stretched by default.

rahulsinghleo Mar 25, 2009 at 8:31 PM 
HI! Samantha,

Thnaks for the help. I was missing Refrence for the main lib "System.Windows.Controls.Theming".

Can we change the theam at run time?

Thanks
Rahul Singh


SamanthaMSFT Mar 25, 2009 at 6:28 PM 
Hi Rahul, Have you referenced the WPFToolkit assembly in your application? I believe the themes are dependent on the Toolkit b/c they make use of VisualStateManager. If you've already referenced the Toolkit, then I'm not sure what it could be...

rahulsinghleo Mar 25, 2009 at 4:12 PM 
hi! Samantha,

I can see in the Designer that the theam has changed. But get this error when i complie the project

Error 1 Unknown build error, 'Cannot resolve dependency to assembly 'System.Windows.Controls.Theming, Version=2.0.21024.1839, Culture=neutral, PublicKeyToken=2c5c654d367bf4a7' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Line 136 Position 36.' E:\NEWDevelopment\Stores System\2009.03.22 RibbonBar\TabsFMWpfStoresSystem\TabsFMWpfStoresSystem\StoresSystem.xaml 136 36 TabsFMWpfStoresSystem


Thanks
Rahul Singh

richarddeeming Mar 24, 2009 at 4:30 PM 
Some of the templates (eg TwilightBlue) seem to be missing the RecognizesAccessKey property on the ContentPresenter for some controls (eg Button). As a result, buttons show as "_OK" instead of "OK".

oskarh Mar 24, 2009 at 9:46 AM 
By the way, I have found that it is not possible to use DisplayMemberPath (for example when binding to a ComboBox) with the themes. Instead you have to specify an ItemTemplate for the ComboBox. The themes seems to override the effect of DisplayMemberPath, making the ComboBox items only contain the result of ToString() applied to them. Not a big issue though..

oskarh Mar 24, 2009 at 9:38 AM 
Thanks Samatha!

SamanthaMSFT Mar 24, 2009 at 12:25 AM 
I've updated this page with some sample usage. Does that help?

oskarh Mar 23, 2009 at 10:42 AM 
Agree, a quick quide/walkthrough on how to use these themes would be appreciated!

shaggygi Mar 21, 2009 at 2:26 PM 
Will you be releasing a walkthrough on how to use new WPF themes in WPF app? Thanks