Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic LoadFromXML (Read 1888 times)
RichardW2C
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Jul 13th, 2011
LoadFromXML
Jul 18th, 2011 at 2:14pm
Print Post  
Hi

In the FCDemo project, I see that tableNodes are created with the loadFromXML method.

It is very interesting for me, I would like to be able to create digrams like that. But I do not find, in the documentation, how to directly write such a XML file.

I would like to know what are those constraints:
[code]
<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>
[/code]

or what means 1023 in

[code]
<EnabledHandles>1023</EnabledHandles>
[/code]

Is there a documentation for creating nodes with XML?

By the way, any exemple of codes with NodeTable would be welcomme :) .

Thank you

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: LoadFromXML
Reply #1 - Jul 18th, 2011 at 2:45pm
Print Post  
Hi,

Here's an example we haven't released yet, so it might be a little buggy:
https://www.mindfusion.eu/_samples/ClassDiagram.Wpf.zip

Use the File -> Load Assembly command to load diagramming.wpf.dll and you will see a lot of tables created.

Regarding XML files, we have never created ones directly... The ones from the demo were probably created by calling Diagram.SaveToXml, where the diagrams were either drawn manually or generated from code as in the sample above.

If you decide to generate the XML yourself, it should be safe to skip properties you are not interested in. The control should assign default values if it can't find the element for a property.

In the specific example above, EnabledHandles (and any other enum- element) contains the integer value you get when you typecast an enum bit-mask to int. The node constraints is what you assign through the node.Cosntraints property, where the indices correspond to the following members respectively: MoveDirection / MinWidth / MinHeight / MaxWidth / MaxHeight / KeepInsideParent / KeepRatio / DisableMirroring.

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


I love YaBB 1G - SP1!

Posts: 19
Joined: Jul 13th, 2011
Re: LoadFromXML
Reply #2 - Jul 19th, 2011 at 7:34am
Print Post  
Thanks for your answer, Stoyo, the examples will help!

Richard
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint