This is a migrated thread and some comments may be shown as answers.

Property 'x' does not exist in namespace

2 Answers 127 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Unisense
Top achievements
Rank 1
Unisense asked on 17 Dec 2013, 08:21 AM
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 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 20 Dec 2013, 10:49 AM
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 >>
0
Unisense
Top achievements
Rank 1
answered on 20 Dec 2013, 11:09 AM
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


Tags
General Discussions
Asked by
Unisense
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Unisense
Top achievements
Rank 1
Share this question
or