Property 'x' does not exist in namespace

3 posts, 0 answers
  1. Unisense
    Unisense avatar
    34 posts
    Member since:
    Sep 2012

    Posted 17 Dec 2013 Link to this post

    Hi,

    I have had this problem a couple of times now and i dont understand why it happens. 

    Every time i try to use a property on for example an AreaSeries, the compiler tells me that this property does not exist in the telerik namespace "http://schemas.telerik.com/2008/xaml/presentation" even though the intellisense suggest the property. 

    See attached image.

    I have the following code for the graph:
    <telerik:RadCartesianChart Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Margin="0,0,0,3" x:Name="lineSeries" ClipToBounds="False">
                <telerik:RadCartesianChart.VerticalAxis>
                    <telerik:LinearAxis IsInverse="True" Name="verticalAxis" Title="Depth(µm)"/>
                </telerik:RadCartesianChart.VerticalAxis>
     
                <telerik:RadCartesianChart.HorizontalAxis>
                    <telerik:LinearAxis Name="horizontalAxis" Title="Concentration(µmol/l)"/>
                </telerik:RadCartesianChart.HorizontalAxis>
                 
                <telerik:ScatterPointSeries x:Name="pointSeries" XValueBinding="XValue" YValueBinding="YValue" ItemsSource="{Binding}">
                    <telerik:ScatterPointSeries.PointTemplate>
                        <DataTemplate>
                            <Ellipse Width="17" Height="17" Fill="Blue"/>
                        </DataTemplate>
                    </telerik:ScatterPointSeries.PointTemplate>
                </telerik:ScatterPointSeries>
     
                <telerik:ScatterLineSeries ItemsSource="{Binding}" StrokeThickness="1.5" x:Name="serie" Stroke="Red" XValueBinding="XValue" YValueBinding="YValue">
                </telerik:ScatterLineSeries>
     
                <telerik:AreaSeries StrokeThickness="2" Fill="Gray">
                    <telerik:AreaSeries.DataPoints>
                        <telerik:CategoricalDataPoint Value="20"/>
                        <telerik:CategoricalDataPoint Value="40"/>
                        <telerik:CategoricalDataPoint Value="35"/>
                        <telerik:CategoricalDataPoint Value="40"/>
                        <telerik:CategoricalDataPoint Value="30"/>
                        <telerik:CategoricalDataPoint Value="50"/>
                    </telerik:AreaSeries.DataPoints>
                </telerik:AreaSeries>
     
                <telerik:RadCartesianChart.Behaviors>
                    <telerik:ChartPanAndZoomBehavior ZoomMode="Both" PanMode="Both"/>
                </telerik:RadCartesianChart.Behaviors>
     
                <telerik:RadCartesianChart.Grid>
                    <telerik:CartesianChartGrid Name="chartGrid" MajorLinesVisibility="XY" MajorXLineDashArray="5, 5" MajorYLineDashArray="5, 5">
                        <telerik:CartesianChartGrid.MajorXLineStyle>
                            <Style TargetType="Line">
                                <Setter Property="Shape.Stroke" Value="Gray" />
                            </Style>
                        </telerik:CartesianChartGrid.MajorXLineStyle>
                        <telerik:CartesianChartGrid.MajorYLineStyle>
                            <Style TargetType="Line">
                                <Setter Property="Shape.Stroke" Value="Gray" />
                            </Style>
                        </telerik:CartesianChartGrid.MajorYLineStyle>
                    </telerik:CartesianChartGrid>
                </telerik:RadCartesianChart.Grid>
            </telerik:RadCartesianChart>


    I must be doing something wrong here i just cant see what it is :)

    Best regards,
    Jeppe
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 20 Dec 2013 Link to this post

    Hello Jeppe,

    I wasn't able to reproduce this issue locally. I prepared a sample project using the code snippet you sent, however please note that I changed the HorizontalAxis to be Categorical as you have defined CategoricalDataPoints in the AreaSeries and I wanted to display them.

    The Stroke and the Fill of the area are properly applied and I don't receive any errors. I have referenced the three required assemblies for the ChartView components:
    • Telerik.Windows.Data.dll
    • Telerik.Windows.Controls.dll
    • Telerik.Windows.Controls.Chart.dll

    Please have a look at the solution and let me know if you receive any errors regarding the style-related properties.


    Regards,
    Tina Stancheva
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Unisense
    Unisense avatar
    34 posts
    Member since:
    Sep 2012

    Posted 20 Dec 2013 Link to this post

    Hi Tina Stancheva,

    I dont get any errors when running your application. It is kind of weird but i must be doing something wrong.

    But i have just found out that if i use ScatterAreaSeries it works fine. Still if i switch back to AreaSeries it doesnt work. 

    So i think i'll use the ScatterAresSeries - but still dont understand why i cant use AreaSeries in my project :)

    Thank you for your time and respons - have a nice christmas.

    Best regards,
    Jeppe


Back to Top