Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'IndependentValue' member is not valid because it does not have a qualifying type name in chartinToolkit wpf

i am trying to view the value of aces in my chart but i have the following error "'IndependentValue' member is not valid because it does not have a qualifying type name in chartinToolkit wpf "

this is my code

    <Window x:Class="WpfToolkitChart.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="1031" Width="855" xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"  FlowDirection="RightToLeft">

<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="0,-28,0,28">
    <Grid Height="500">

        <chartingToolkit:Chart  Name="lineChart" Title="Line Series Demo" VerticalAlignment="Top" Margin="33,6,6,0" Height="440" Foreground="DarkRed" FlowDirection="LeftToRight" FontFamily="CPalatineLinoType">
            <chartingToolkit:LineSeries  DependentValuePath="Value" IndependentValuePath="Key" ItemsSource="{Binding}" IsSelectionEnabled="True"/>

            <ToolTipService.ToolTip>
                <StackPanel Margin="2,2,2,2">
                    <ContentControl Content="{TemplateBinding IndependentValue}" FontSize="12"/>
                    <ContentControl Content="{TemplateBinding DependentValue}"   FontSize="12"/>
                </StackPanel>
            </ToolTipService.ToolTip>
        </chartingToolkit:Chart>
    </Grid>
</ScrollViewer>

please cany any one help me in this thanks :)

like image 340
shaymaa adel Avatar asked Aug 24 '16 10:08

shaymaa adel


1 Answers

Just in case someone lands here searching for the error message, I was getting it simply because I was mistakenly using x:Static instead of StaticResource to access a locally declared resource.

Hope this helps someone down the road.

like image 83
dotNET Avatar answered Nov 03 '22 14:11

dotNET