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

Setting DataContext of hosting Control for the RadDiagram causes UI Links to crash

1 Answer 44 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 09 May 2012, 03:09 PM
Hello,

In a UserControl, setting up the following causes the RadDiagram to crash when the Connectors are clicked when running
<Grid x:Name="LayoutRoot" Background="White">
  <telerik:RadDiagram >
    <telerik:RadDiagramShape />
  </telerik:RadDiagram>
</Grid>

In the code behind
namespace SilverlightApplication1.Classes
{
    public partial class Test : UserControl
    {
        public Test()
        {
            InitializeComponent();
            this.LayoutRoot.DataContext = this;
            //Comment out the line above to resolve the issue
        }
    }
}

Please could you let me know if there is something incorrect, with the changing of the datacontext,
or if there is something that I should be doing instead?

I am using version 2012.1.507.1050 of the assemblies.
When the application is running, click any of the connector nodes.
The application crashes with :
    Exception has been thrown by the target of an invocation.
        {System.ArgumentException: Value does not fall within the expected range.
   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, DependencyObject doh)
   at MS.Internal.XcpImports.SetValue(IManagedPeerBase doh, DependencyProperty property, Object obj)
   at System.Windows.DependencyObject.SetObjectValueToCore(DependencyProperty dp, Object value)
   at System.Windows.DependencyObject.SetEffectiveValue(DependencyProperty property, EffectiveValueEntry& newEntry, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
   at System.Windows.Data.BindingExpression.SendDataToTarget()
   at System.Windows.Data.BindingExpression.SourceAcquired()
   at System.Windows.Data.Debugging.BindingBreakPoint.<>c__DisplayClass4.<BreakOnSharedType>b__3()}
Many thanks.

1 Answer, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 14 May 2012, 07:51 AM
Hi,

 Thank you for reporting this issue. I have logged this in our PITS here so you can track its progress.

All the best,
Alex Fidanov
the Telerik team

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

Tags
Diagram
Asked by
John
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Share this question
or