Available themes.

Sep 29, 2010 at 8:28 PM

Forgive me, but I'm new to CodePlex, new to AvalonDock (which is totally awesome), and new to the discussion boards.

I've been looking around, but I can't find a list of all of the themes that are available in the most recent release.

I have seen references to "dev2010" and "expressiondark" -- those both work.

I have seen references to "classic" and a couple of others, but I can't get those to work. Perhaps I'm coding it wrong.

 

Here's a pair of examples (the first works fine, the second does not):

<Application x:Class="AvalonDockTest1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/AvalonDock.Themes;Component/Themes/Dev2010.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

 

<Application x:Class="AvalonDockTest1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/AvalonDock.Themes;Component/Themes/Classic.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

I get an "XamlParseException" with that second one. Am I coding it wrong?

 

Regardless, what are the currently available themes?

 

Thanks a bunch.

Sep 29, 2010 at 8:57 PM

OK, I solved a little bit.

 

I found a post about setting the theme in the code-behind file. I found that the following works:

 

            string uri = "/AvalonDock.Themes;component/themes/dev2010.xaml";
            AvalonDock.ThemeFactory.ChangeTheme(new Uri(uri, UriKind.RelativeOrAbsolute));

just like in the other post.

I also found that the following works (but only with "classic" so far):

            AvalonDock.ThemeFactory.ChangeTheme("classic");

 

Any thoughts?

Thanks.

Oct 4, 2010 at 9:36 PM

From the readme:

"AvalonDock.Themes contains two compiled themes (dev2010.xaml and ExpressionDark.xaml). It will contain more themesin the future."

Your snip of code specifying Uri helped me out though, in the ThemeFactory.ChangeTheme(string) method, there is this line:

 rd.Source = new Uri("/AvalonDock;component/themes/" + theme + ".xaml", UriKind.RelativeOrAbsolute);

which assumes the themes are in the AvalonDock assembly. should be this:

 rd.Source = new Uri("/AvalonDock.Themes;component/themes/" + theme + ".xaml", UriKind.RelativeOrAbsolute);

Actually, it'd be cool if we can just specify our own assembly and themes, I'm liking DavesGlossyControls from the Wpf.Themes project, I'd love to whip something up for AvalonDock to use that theme.  In the meantime, ExpressionDark is working fine for me, looks slick.

-chris