Issue with ThemeManager

Navigation for WPF Forum

Posted 12 years ago by Hamid Noorbakhsh
Version: 12.1.0560
Platform: .NET 4.0
Environment: Windows 7 (64-bit)

I have a simple project, just one window:

<Window x:Class="ActiProOfficeTheme.MainWindow"
        Title="MainWindow" Height="350" Width="525">
        <navigation:NavigationBar x:Name="navbar" SelectedIndex="1">
            <navigation:NavigationPane Title="Quak" />
            <navigation:NavigationPane Title="Muuh" />

Code in back:

public MainWindow()
    ThemeManager.SetTheme(navbar, ThemeName.OfficeBlack.ToString());

 I cannot get the Office Themes to change to the color I want. It is the Generic Theme always. If I apply other Themes, some work (High Contrast works), so what am I missing?

Comments (1)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Hamid,

We never recommend that you use the ThemeManager.SetTheme method because you will be loading a large number of resources for a single control.  That method is just for testing.  You really should be setting the ThemeManager.CurrentTheme property in your app startup before any UI loads instead.

Also, Office themes require a couple other lines of code to register them.  If you miss those steps then they will show as Generic.  Make sure you read through the "Actipro Themes" topics in the documentation that comes with WPF Studio.  It talks about all these things in detail.

Actipro Software Support

The latest build of this product (v24.1.2) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.