views:

12

answers:

1

I am trying to use the newly released Jetpack theme for a Silverlight 4 application. TabControl and buttons style nicely, but I cannot get the Accordion control to pick up the Jetpack style.

I have created a default 'Silverlight Navigation (JetPack Theme)' VS project and added the following definitions to the XAML file

xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"       
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 

And then I've added the accordion control like this:

    <toolkit:Accordion Grid.Column="0"
                       SelectionMode="OneOrMore" ExpandDirection="Down" SelectionSequence="Simultaneous">
        <toolkit:AccordionItem Header="Stages">
            <TextBlock>Stages</TextBlock>
        </toolkit:AccordionItem>
        <toolkit:AccordionItem Header="Products">
            <TextBlock>Products</TextBlock>
        </toolkit:AccordionItem>
    </toolkit:Accordion>

This control renders as part of the page, but using the default toolkit style, rather than the JetPack style like the other controls on the page. Am I using the wrong toolkit namespace? I've tried to modify ToolkitStyles.xaml to add a key to the accordion style and reference the style via Style attribute in toolkit:Accordion but without success.

Have anyone successfully styled the accordion control with the JetPack theme?

A: 

After following the instruction in App.xaml (uncomment the reference to Assets\ToolkitStyles.xaml and setting the build action on that same file) I got the sample project to compile and run successfully with the accordion control styled.

Philipp Schmid