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

Tye type of namespace name 'Windows' does not exist ...

3 Answers 868 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Jesper
Top achievements
Rank 1
Jesper asked on 04 Jul 2012, 08:37 AM
I'm trying to get myself introduced into using the RadChartView here and I'm working from your demos on the matter but when I try building I get this compiler error: 

message: The type or namespace name 'Windows' does not exist in the namespace 'Spike.Telerik' (are you missing an assembly reference?)
file: GvsDefectsChartControl.xaml 19 26
project: Spike.Telerik.RadChartView

Apparently there's an assembly that needs to be referenced but the message isn't gibing me much of a hint on which one.
Also, on the whole, I think your demos are lacking in this area. None of the XAML examples I've seen includes the namespace declarations, just the rendered tags. Those all include custom (Telerik) namespaces. Fortunately I have Jetbrains Resharper to help me set up the correct namespace declarations but I'm still stuck with the above error.

This is my complete XAML:

<UserControl x:Class="Spike.Telerik.RadChartView.MyTestChartViewControl"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Chart"
             xmlns:chartView="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             xmlns:GVS="clr-namespace:Spike.RADChart.GVS"
             d:DesignHeight="300" d:DesignWidth="300">
     
    <UserControl.Resources>
        <GVS:MyViewModel x:Key="_testVM"/>
    </UserControl.Resources>
     
    <Grid DataContext="{StaticResource _testVM}">
             
        <chart:RadCartesianChart >
 
            <chart:RadCartesianChart.HorizontalAxis>
                <chartView:DateTimeCategoricalAxis LabelRotationAngle="50" LabelFormat="HH:mm"/>
            </chart:RadCartesianChart.HorizontalAxis>
 
            <chart:RadCartesianChart.VerticalAxis>
                <chartView:LinearAxis />
            </chart:RadCartesianChart.VerticalAxis>
 
            <chart:RadCartesianChart.Series>
                <chartView:SplineSeries
                    ItemsSource="{Binding Path=Data}"
                    CategoryBinding="Time"
                    ValueBinding="Value"
                    />
 
            </chart:RadCartesianChart.Series>
             
        </chart:RadCartesianChart>
         
    </Grid>
</UserControl>


I would appreciate any help.
Thanks

3 Answers, 1 is accepted

Sort by
0
Jesper
Top achievements
Rank 1
answered on 04 Jul 2012, 11:10 AM
Never mind. Seems the problem "self healed".
0
Anton
Top achievements
Rank 1
answered on 26 Jan 2018, 09:09 AM

I got the same problem.

 

Works:

<telerik:RadCartesianChart>
</telerik:RadCartesianChart>

 

Does not work:

<telerik:RadCartesianChart x:Name="Test">
</telerik:RadCartesianChart>

 

> The type or namespace name 'Windows' does not exist in the namespace MyApps.Charts.Telerik

 

I had to rename MyApp.Charts.Telerik namespace to fix the error.

0
Dinko | Tech Support Engineer
Telerik team
answered on 31 Jan 2018, 08:04 AM
Hi Anton,

This error appears in a scenario when there is a conflict between our namespace and namespace which you have used. In your post, I can see that you have used "Telerik" string in your namespace. I would recommend you to avoid using our namespace in your namespaces in your application. Instead, you can consider creating custom namespaces so such errors don't appear.

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ChartView
Asked by
Jesper
Top achievements
Rank 1
Answers by
Jesper
Top achievements
Rank 1
Anton
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or