I've just compiled an old project that uses Presentation Framework's DataVisualization and I'm getting a "Not Suported Exception":
Cannot convert the value in attribute 'Property' to object of type 'System.Windows.DependencyProperty'.
at
System.Windows.Markup.DependencyPropertyConverter.ResolveProperty(IServiceProvider serviceProvider, String targetName, Object source)"
Great, easy to solve, just don't set a non dependency property in a setter right?
Except it's occurring on the code-behind line:
var la = new LinearAxis();
and the exception in the presentation framework itself, which I have no control over. Has anyone encountered this? How can I solve an error in an external library like this? I can't imagine it's a bug in the constructor, I must be doing something on my end that's causing it.
This is the chart style, I'll try removing it and see if that's affecting things:
<Style TargetType="{x:Type chartingToolkit:Chart}">
<!--<Setter Property="LegendStyle" Value="{StaticResource LedgendStyle}"/>-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type chartingToolkit:Chart}">
<Border Background="{TemplateBinding Background}" BorderBrush="{x:Null}" BorderThickness="0" Padding="2">
<Grid>
<Primitives:EdgePanel x:Name="ChartArea" Style="{TemplateBinding ChartAreaStyle}">
<Grid Panel.ZIndex="-1" Style="{TemplateBinding PlotAreaStyle}" Background="{StaticResource GraphBackground}" />
<Border Panel.ZIndex="10" BorderBrush="{StaticResource GraphBorder}" BorderThickness="{StaticResource GrephBorderThickness}" />
</Primitives:EdgePanel>
<visualizationToolkit:Legend
x:Name="Legend"
Style="{TemplateBinding LegendStyle}"
Grid.Column="1"
Margin="50,10"
VerticalAlignment="Top"
HorizontalAlignment="Left"
Background="{StaticResource LegendBackground}"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
One thing I've noticed, if I run without debug everything seems fine...