Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Trouble loading Diagram Link in a control node (Read 4132 times)
solisgsandc
YaBB Newbies
*
Offline



Posts: 40
Joined: Dec 18th, 2009
Trouble loading Diagram Link in a control node
Jan 11th, 2010 at 6:07pm
Print Post  
For some reason, there is a control node that is created with a UIElement of a diagramlink. I am not sure how this is created. When I save the diagram, this object is created as well. I would like to know why this is a problem in loading using LoadXML.
I delete this node and everything loads again.

<Node Class="std:ControlNode" Version="1" Id="6">

     <UIElement>

       <DiagramLink Style="Cascading" Text="" TextStyle="Center" TextBrush="#FF000000" HeadShape="None" BaseShape="None" IntermediateShape="None" HeadShapeSize="18.897637795275593" BaseShapeSize="18.897637795275593" IntermediateShapeSize="18.897637795275593" OriginAnchor="-1" DestinationAnchor="-1" SegmentCount="2" Origin="{x:Null}" Destination="{x:Null}" OriginIndex="-1" DestinationIndex="-1" Dynamic="False" RetainForm="True" AutoRoute="False" CascadeOrientation="Auto" AllowMoveStart="True" AllowMoveEnd="True" Visible="True" DrawCrossings="True" CustomDraw="None" SnapToNodeBorder="False" HandlesStyle="SquareHandles" Tag="{x:Null}" Brush="#FF78DCFF" Locked="False" Selected="False" ZIndex="0" Printable="True" ToolTip="{x:Null}" IgnoreLayout="False" Weight="1" HyperLink="" RenderTransform="1,0,0,1,87.5,27.5" Effect="{x:Null}" xmlns="clr-namespace:MindFusion.Diagramming.Wpf;assembly=MindFusion.Diagramming.
Wpf" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

         <DiagramLink.HeadPen>

           <av:Pen Brush="#FF000000" Thickness="3" />

         </DiagramLink.HeadPen>

         <DiagramLink.Font>

           <Font Name="Arial" Size="10.75" Style="Normal" Weight="Normal" Unit="World">

             <Font.Decorations>

               <x:Null />

             </Font.Decorations>

           </Font>

         </DiagramLink.Font>

         <DiagramLink.Pen>

           <av:Pen Brush="#FF000000" Thickness="3" />

         </DiagramLink.Pen>

       </DiagramLink>

     </UIElement>

     <Bounds>87.5, 27.5, 125, 150</Bounds>

     <ZIndex>6</ZIndex>

     <HyperLink>

     </HyperLink>

     <Locked>False</Locked>

     <Visible>True</Visible>

     <Printable>True</Printable>

     <Brush Id="1" />

     <Pen>

       <Pen Brush="#FF000000" Thickness="1" LineJoin="Bevel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" />

     </Pen>

     <Font>

       <Name>Arial</Name>

       <Size>10.75</Size>

       <Unit>0</Unit>

       <Bold>False</Bold>

       <Italic>False</Italic>

       <Underline>False</Underline>

       <Strikeout>False</Strikeout>

     </Font>

     <ShadowColor>#FF6E6E8C</ShadowColor>

     <ShadowOffsetX>3.77952755905512</ShadowOffsetX>

     <ShadowOffsetY>3.77952755905512</ShadowOffsetY>

     <Weight>1</Weight>

     <IgnoreLayout>False</IgnoreLayout>

     <Constraints>

       <Constraint Type="0">

         <Value>0</Value>

       </Constraint>

       <Constraint Type="1">

         <Value>0</Value>

       </Constraint>

       <Constraint Type="2">

         <Value>0</Value>

       </Constraint>

       <Constraint Type="3">

         <Value>0</Value>

       </Constraint>

       <Constraint Type="4">

         <Value>0</Value>

       </Constraint>

       <Constraint Type="5">

         <Value>False</Value>

       </Constraint>

       <Constraint Type="6">

         <Value>False</Value>

       </Constraint>

       <Constraint Type="7">

         <Value>False</Value>

       </Constraint>

     </Constraints>

     <Obstacle>True</Obstacle>

     <AllowIncomingLinks>True</AllowIncomingLinks>

     <AllowOutgoingLinks>True</AllowOutgoingLinks>

     <EnabledHandles>511</EnabledHandles>

     <Expanded>True</Expanded>

     <Expandable>False</Expandable>

     <HandlesStyle>4</HandlesStyle>

    </Node>

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Trouble loading Diagram Link in a control node
Reply #1 - Jan 11th, 2010 at 8:03pm
Print Post  
Are you by chance creating a DiagramNodeAdapter with a DiagramLink as its argument at some point?
  
Back to top
 
IP Logged
 
solisgsandc
YaBB Newbies
*
Offline



Posts: 40
Joined: Dec 18th, 2009
Re: Trouble loading Diagram Link in a control node
Reply #2 - Jan 12th, 2010 at 7:18pm
Print Post  
No. But I do use this statement.

diagram.CustomNodeType = typeof(DiagramLink);

Will this cause the link to be created inside a control node?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Trouble loading Diagram Link in a control node
Reply #3 - Jan 12th, 2010 at 8:57pm
Print Post  
Yes, this automatically creates a DiagramNodeAdapter wrapper around the object instantiated from the specified type. If you need to draw links from a custom type, assign it to the CustomLinkType property.
  
Back to top
 
IP Logged
 
solisgsandc
YaBB Newbies
*
Offline



Posts: 40
Joined: Dec 18th, 2009
Re: Trouble loading Diagram Link in a control node
Reply #4 - Jan 13th, 2010 at 11:02pm
Print Post  
Thanks for confirming.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint