tags:

views:

478

answers:

1

Hi I have moved a project I was working on from one machine to another, and am now getting an error message when I attempt to build. The two machines should have the same software setup, but it appears they do not. The error in question is:

The tag 'StylePalette' does not exist in XML namespace 'clr-namespace:System.Windows.Controls.DataVisualization; assembly=System.Windows.Controls.DataVisualization.Toolkit

And a chunk of the XAML in question:

<datavis:StylePalette
        x:Key="MyStylePalette">
    <!--Blue-->
    <Style TargetType="Control">
        <Setter Property="Template" Value="{StaticResource MyPieDataPointTemplate}"/>
        <Setter Property="Background">
            <Setter.Value>
                <RadialGradientBrush>
                    <RadialGradientBrush.RelativeTransform>
                        <TransformGroup>
                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.09" ScaleY="1.819"/>
                            <TranslateTransform X="-0.425" Y="-0.486"/>
                        </TransformGroup>
                    </RadialGradientBrush.RelativeTransform>
                    <GradientStop Color="#FFB9D6F7"/>
                    <GradientStop Color="#FF284B70" Offset="1"/>
                </RadialGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>

I have the latest Silverlight Toolkit installed on my new machine but am guessing the problem must be to do with that.

I had heard that StylePalette had been renamed to palette but this does not seem to exist in the toolkit namespace.

Thanks in advance

+1  A: 

Sounds like the new machine has an updated version of the Toolkit.

The StylePalette not longer exists, you should use the more general type ResourceDictionaryCollection. Also properties original named StylePalette have been renamed to simply Palette. See this Delay's Blog on the issue.

AnthonyWJones