Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Layout exception (Read 4557 times)
binuvc
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 46
Joined: Nov 7th, 2011
Layout exception
Feb 14th, 2012 at 11:14am
Print Post  
Hi,

We migrated to version 2.3 of the silverlight diagramlite control and started getting the following exception

Value doesnot fall within the expecrted range

Stack trace :

   at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
   at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual)
   at System.Windows.UIElement.TransformToVisual(UIElement visual)
   at MindFusion.Diagramming.Silverlight.Utilities.x4560435d0cf1febd(FrameworkElement x51f1b1b519790f33, Point x2f7096dac971d6ec)
   at MindFusion.Diagramming.Silverlight.DiagramNode.ContainsPoint(Point point)
   at MindFusion.Diagramming.Silverlight.DiagramLink.x757073de6e5d75da(ConnectionPoint
x97530273d342b6f8, ConnectionPoint xdc3523bf52410ca4, Point& x10aaa7cdfa38f254, Point& xca09b6c2b5b18485)
   at MindFusion.Diagramming.Silverlight.DiagramLink.x4318b56ddecba973(Action xab8fe3cd8c5556fb, Boolean xe8a1089275252290, ConnectionPoint x97530273d342b6f8, ConnectionPoint xdc3523bf52410ca4)
   at MindFusion.Diagramming.Silverlight.DiagramLink.x4318b56ddecba973(Action xab8fe3cd8c5556fb, Boolean xe8a1089275252290)
   at MindFusion.Diagramming.Silverlight.DiagramLink.UpdateDynamicLink()
   at MindFusion.Diagramming.Silverlight.DiagramLink.xf320dc171fee20e1()
   at MindFusion.Diagramming.Silverlight.DiagramNode.xd906270113e35cbf(DiagramItem xccb63ca5f63dc470)
   at MindFusion.Diagramming.Silverlight.xcb359d3cc19bff83.Accept(DiagramItem item)
   at MindFusion.Diagramming.Silverlight.DiagramNode.x36c189560c1bcef6(x6933c0ea05ceb1
03 x2103dfe2fdcd2bb1, x6933c0ea05ceb103 x79ccaefbc569439c)
   at MindFusion.Diagramming.Silverlight.DiagramNode.xf320dc171fee20e1()
   at MindFusion.Diagramming.Silverlight.DiagramNode.OnBoundsChanged(Rect oldRect, Rect newRect, Boolean updateChildren, Boolean updateStorage)
   at MindFusion.Diagramming.Silverlight.DiagramNode.SetBounds(Rect newRect, Boolean updateChildren)
   at MindFusion.Diagramming.Silverlight.DiagramNode.xdceb361b85ee0119(Double xb73c4e7368f9939f, Double xd143f88fddaa10ad)
   at MindFusion.Diagramming.Silverlight.Layout.x73e4e74934f5902b.set_x6ae4612a8469678
e(Rect xbcea506a33cf9111)
   at MindFusion.Layout.xd534f9a23d685c33.xb7874248b0c0bc2d(x5e63d74830b5db57 x8e7bfcccb55aaf8f, xc42df4441cc98848 xd07ce4b74c5774a7, xc76ab3b1761f0c50 x8d3f74e5f925679c, x78e3ce9dc43283f0 x22bfd1664c623dc4)
   at MindFusion.Diagramming.Silverlight.Layout.SwimlaneLayout.x1d21b37097156a35(Diagr
am x8b62359f01cfd806, IEnumerable xf8b54ce7724a27f2)
   at MindFusion.Diagramming.Silverlight.Layout.Layout.Arrange(Diagram diagram, DiagramItemCollection items)
   at MindFusion.Diagramming.Silverlight.Layout.SwimlaneLayout.Arrange(Diagram diagram, DiagramItemCollection items)
   at MindFusion.Diagramming.Silverlight.Layout.Layout.Arrange(Diagram diagram)


on calling swimlane layout. arrange method

Please advice

Thanks
BinuVC
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layout exception
Reply #1 - Feb 15th, 2012 at 8:49am
Print Post  
From what I can find on the Internet, TransformToVisual throws this exception if either its argument or the object on which the method is invoked is not part of the Silverlight visual tree yet. If you are running the layout from your page class constructor, try moving it to the Loaded event handler where the visual tree should already be constructed. Also try calling diagram.UpdateLayout before applying the layout to ensure that the Silverlight layout pass has completed at least once.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
binuvc
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 46
Joined: Nov 7th, 2011
Re: Layout exception
Reply #2 - Feb 15th, 2012 at 10:09am
Print Post  
Hi,

It worked on loading diagram in layoutupdated of the control.


Many thanks for the help!! Smiley

BinuVC
  
Back to top
 
IP Logged
 
binuvc
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 46
Joined: Nov 7th, 2011
Re: Layout exception
Reply #3 - Feb 24th, 2012 at 9:42am
Print Post  
Hi,

We are opening multiple diagrams in different tabs. There are scenarios where modification to one diagram makes some modification to the other( where shapenodes representing the same objects are placed, adding a child element to shapenode in one diagram should automatically add the same object as child to the shapenode in the other diagram.)

But when the diagram which is in the hidden tab is updated, it throws an exception as follows :

   at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
   at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual)
   at System.Windows.UIElement.TransformToVisual(UIElement visual)
   at MindFusion.Diagramming.Silverlight.Utilities.x4560435d0cf1febd(FrameworkElement x51f1b1b519790f33, Point x2f7096dac971d6ec)
   at MindFusion.Diagramming.Silverlight.DiagramNode.ContainsPoint(Point point)
   at MindFusion.Diagramming.Silverlight.DiagramLink.x757073de6e5d75da(ConnectionPoint
x97530273d342b6f8, ConnectionPoint xdc3523bf52410ca4, Point& x10aaa7cdfa38f254, Point& xca09b6c2b5b18485)
   at MindFusion.Diagramming.Silverlight.DiagramLink.x4318b56ddecba973(Action xab8fe3cd8c5556fb, Boolean xe8a1089275252290, ConnectionPoint x97530273d342b6f8, ConnectionPoint xdc3523bf52410ca4)
   at MindFusion.Diagramming.Silverlight.DiagramLink.x4318b56ddecba973(Action xab8fe3cd8c5556fb, Boolean xe8a1089275252290)
   at MindFusion.Diagramming.Silverlight.DiagramLink.UpdateDynamicLink()
   at MindFusion.Diagramming.Silverlight.DiagramLink.xf320dc171fee20e1()
   at MindFusion.Diagramming.Silverlight.ConnectionPoint.set_AnchorPointIndex(Int32 value)
   at MindFusion.Diagramming.Silverlight.DiagramLink.set_OriginAnchor(Int32 value)
   at MindFusion.Diagramming.Silverlight.Factory.CreateDiagramLink(ShapeNode origin, Int32 originAnchor, ShapeNode destination, Int32 destAnchor)


Please advice

Thanks in advance
BinuVC
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layout exception
Reply #4 - Feb 24th, 2012 at 10:38am
Print Post  
Have you tried calling UpdateLayout on the hidden diagram before modifying it?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint