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

Why does System.Windows.Markup.XamlParseException throw when I try to use RadChartView in UserControl XAML?

3 Answers 2577 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Eugene
Top achievements
Rank 1
Eugene asked on 26 Feb 2016, 06:00 AM

.I have the following error when I use RadChartView: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dll with message: "Could not load file or assembly Telerik.Windows.Controls.Chart, PublicKeyToken=5803cfa389c90ce7 or one of its dependencies. The system cannot find the file specified". Below is UserControl XAML code where the exception is thrown.

<UserControl x:Class="DeviceStatus.Views.DeviceStatusView"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:prism="http://prismlibrary.com/"             
             prism:ViewModelLocator.AutoWireViewModel="True">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <Label Grid.Row="0" Grid.Column="0" Content="Состояние прибора" VerticalAlignment="Bottom"/>
        <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding DeviceStatusModel.Header}" AutomationProperties.AutomationId="DeviceStatusTextBox"/>

        <telerik:RadCartesianChart Grid.Row="1" Grid.Column="0">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
        </telerik:RadCartesianChart>

    </Grid>
</UserControl>

I develop my WPF MVVM application using Prism 6. I use MS VS 2015 Professional as IDE. I had created the my app solution and shell project there using Prism Template Pack. The type of solution is Prism Unity App. After its creation I added Prism Module (WPF) and then added Prism UserControl (WPF) in Views folder of the Prism Module. XAML markup of this UserControl is shown above. Why does this error occur? Please help me eliminate it.

3 Answers, 1 is accepted

Sort by
0
Eugene
Top achievements
Rank 1
answered on 26 Feb 2016, 08:01 AM

I've solved this problem in three steps:

1) Delete the View with RadCartesianChart from my Prism Module project,

2) Create a new View as Prism UserControl (WPF) in the Prism Module project,

3) Drug CartesianChart from Component Pannel to this new View.

So there is miracles and only! But nevertheless, why the error had place in old View deleted?

0
Accepted
Ivan
Telerik team
answered on 01 Mar 2016, 12:15 PM
Hello Eugene,

With the code provided so far we could not reproduce the issue on our side. 

You can try to restart the Visual Studio, clean and rebuild the solution and delete the.suo files. Sometimes in such situation can be helpful even to restart the computer. Most probably the Visual Studio has cached something that is causing the exception.

Regards,
Ivan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Eugene
Top achievements
Rank 1
answered on 28 Mar 2016, 06:01 AM
I had recreated the instance of the control in XAML and error was eliminated.
Tags
ChartView
Asked by
Eugene
Top achievements
Rank 1
Answers by
Eugene
Top achievements
Rank 1
Ivan
Telerik team
Share this question
or