Cannot add RadChart to page

7 posts, 0 answers
  1. William
    William avatar
    2 posts
    Member since:
    Sep 2012

    Posted 03 Oct 2012 Link to this post

    I am new to Silverlight, but have used WPF for quite a few application.  I am now trying to migrate my first system from WPF to Silverlight.  I am creating a Silverlight 5 application in C# using VS2010.

    I have created a very simple Silverlight Application, currently there is nothing defined except a RadTabControl.  I am trying to add a RadChart and I get this exception when I add it from the ToolBox:

    Error Dialog
    [Line:0 Position:0]
    "Object reference not set to an instance of an object"

    I can successfully add RadButton, RadPieChart, RadCube, ( I tried about 10 random Rad controls to see if any others would fail and none of the others failed.)

    Telerik Installations:
    RadControls for Silverlight Q2 2012 SP2
    RadControls for Winforms Q2 2012 SP2
    RadControls for WPF Q2 2012 SP2

    Silverlight Installations:
    Silverlight
    Silverlight 3 SDK
    Silverlight 4 SDK
    Silverlight 5 SDK

    Development
    Visual Studio 2010 Ultimate
    Visual Studio Web Authoring

    Here is my XAML:

    <UserControl x:Class="SilverlightApplication1.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" d:DesignHeight="558" d:DesignWidth="797">


        <Grid x:Name="LayoutRoot" Background="White">
            <telerik:RadTabControl HorizontalAlignment="Stretch" Margin="306,12,12,259" Name="radTabControl1" VerticalAlignment="Stretch">
                <telerik:RadTabItem Header="Main" Height="50" HorizontalAlignment="Left" Name="MainTabItem" VerticalAlignment="Top" Width="100">
                    <telerik:RadButton Content="Button" Height="32" HorizontalAlignment="Left" Margin="209,168,0,0" Name="radButton1" VerticalAlignment="Top" Width="68" />
                </telerik:RadTabItem>
                <telerik:RadTabItem Header="Risks" Height="50" HorizontalAlignment="Left" Name="RiskTabItem" VerticalAlignment="Top" Width="100">
                </telerik:RadTabItem>
                <telerik:RadTabItem Header="Changes" Height="50" HorizontalAlignment="Left" Name="ChangeTabItem" VerticalAlignment="Top" Width="100">
                </telerik:RadTabItem>
            </telerik:RadTabControl>
        </Grid>
    </UserControl>

    Thanks for your help,

    Bill
  2. Nikolay
    Admin
    Nikolay avatar
    385 posts

    Posted 04 Oct 2012 Link to this post

    Hi Bill,

    We are aware of this problematic behavior -- it is related to the Microsoft Silverlight 5 framework itself as reported here and here.

    Let me elaborate on the specific issue -- Silverlight 5 itself (being technology for the Web) does no calls to the full .NET framework but its design-time support (as the one in WPF) does. The problem here is that some Microsoft design-time method calls erroneously started to rely on .NET 4.5 implementation and resolve properly only when .NET 4.5 is installed (crashing with MissingMethodException on earlier versions of .NET).

    Microsoft is aware of the issue and we hope new Silverlight Tools version will become available to fix this  but meanwhile we can suggest you to install .NET4.5 Beta here and that should be enough the address the problem as well.

    Of course, adding RadChart manually, would work as expected, apart from the design time. We would also like to point that we have introduced a new charting control called RadChartView, which we highly recommend for any new projects, as it addresses some of the shortcomings of RadChart.

    Greetings,
    Nikolay
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Arti
    Arti avatar
    2 posts
    Member since:
    Sep 2012

    Posted 13 Nov 2012 Link to this post

    Hi,

    I am also receiving the same error - 
    "Line:0 Position:0"
    On adding Radchart to my project solution. I have worked with radial gauge and it works fine though. Can you please advise what can be done to avoid this?

    I have am working on trial version now. I have to create a POC to go ahead with the project.

    Please help!!

    Thanks,
    Arti
  5. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 16 Nov 2012 Link to this post

    Hi Arti,

    As stated in my colleague Nikolay's previous post, we can suggest you to install .NET4.5 from here.

    Also as he said generally we would encourage you to use the new ChartView control for any new project development that you are starting now. Apart form the fact that there aren't any design-time issues with it that we know of, it addresses some of the limitations and deficiencies that we have identified in the RadChart implementation over the years.

    Regards,
    Petar Kirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. theBoss
    theBoss avatar
    6 posts
    Member since:
    Feb 2012

    Posted 19 Nov 2012 Link to this post

    Hi
    I too have the same problem but before I install the 4.5 beta I must be sure about 'side effects'. like if I upgrade the system to 4.5 will the clients and users be affected by it? Will they need to install the 4.5 aswell (we are talking about corporate level here).
    Also we do not usually install beta software until they are finally release due to the obvious bug fixes.

    Can you help otherwise please provide an alternative solution. 

    Regards
    E.
  7. Arti
    Arti avatar
    2 posts
    Member since:
    Sep 2012

    Posted 19 Nov 2012 Link to this post

     

    Hi,

    Just highlighting this point that .Net 4.5 will also require Windows 7 Operating System. My machine was running on Windows XP. I am upgrading it to 7 now.
    Server Operating system that supports .Net 4.5 are -

    Windows Server 2012 (64-bit edition)

    Windows Server 2008 R2 (64-bit edition)

    Windows Server 2008 SP2 (32-bit and 64-bit editions)

    I have the Windows server that meets the system requirements.

    Thanks,
    Arti

  8. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 21 Nov 2012 Link to this post

    Hi,

    There are some things I need to make clear:
    • The .NET Framework .NET 4.5 was officially released on 15 August 2012 meaning that it is no longer in beta status. It is fully supported on Windows Vista and later operating systems.
    • By installing it on your computer you are not changing the target framework of your project. It remains still a Silverlight 5 project, meaning that this will not affect your clients (end-users) in any way.
    • Visual Studio 2012 comes with .NET 4.5.

    Regards,
    Petar Kirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner