NullReference in Telerik.Windows.Controls.Diagrams

2 posts, 0 answers
  1. Christopher
    Christopher avatar
    1 posts
    Member since:
    Jun 2012

    Posted 05 Jun 2012 Link to this post

    Hello,

    I am evaluating the Telerik diagramming component for WPF and am getting a run time error from the basic example in the documentation, http://www.telerik.com/help/wpf/raddiagram-data-code-behind.html.  In my project I have referenced the following libraries from the RadControls for WPF Q1 2012 SP1\Binaries\WPF40 directory:
    Windows.Controls
    Windows.Controls.Diagrams
    Windows.Diagrams.Core

    Am I missing needed references?

    Thank you for your help.

    Stack trace:
        at Telerik.Windows.Controls.RadDiagramConnection.Update(Boolean isManipulating) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Diagrams\Diagrams\Visuals\Connections\RadDiagramConnection.cs:line 563
       at Telerik.Windows.Controls.RadDiagramConnection.OnApplyTemplate() in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Diagrams\Diagrams\Visuals\Connections\RadDiagramConnection.cs:line 490
       at System.Windows.FrameworkElement.ApplyTemplate()
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Canvas.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Canvas.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
       at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Interop.HwndSource.SetLayoutSize()
       at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
       at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
       at System.Windows.Forms.Integration.ElementHost.OnHandleCreated(EventArgs e)
       at System.Windows.Forms.Control.WmCreate(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.Integration.ElementHost.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 07 Jun 2012 Link to this post

    Hello Christopher,

     We managed to reproduce this issue. The good news is that it is already resolved and the fix is included in our Q2 release scheduled for the middle of this month. If this is critical for you currently, you can use Dispatcher like so:

    diagram.Items.Add(shapeCloud);
            diagram.Items.Add(dbShape);
            Dispatcher.BeginInvoke(new Action(()=>
            diagram.Items.Add(connection)));
            diagram.SelectAll();
    But we highly suggest you to wait for the upcoming release. You can expect lots of improvements and new features in the RadDiagramming Framework.

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top