Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic WPF Databinding Support (Read 2965 times)
kai-uwe.zoland
YaBB Newbies
*
Offline



Posts: 18
Joined: Sep 5th, 2008
WPF Databinding Support
Sep 5th, 2008 at 12:20pm
Print Post  
Hi,

does the WpfDiagram component support the databinding features of xaml?

Something like

<d:Diagram Name="diagram"
AllowDrop="True"
NodesExpandable="True"
DragOver="diagram_DragOver"
NodeClicked="diagram_NodeClicked"
NodeDeleting="diagram_NodeDeleting"
LinkModifying="diagram_LinkModifying"
LinkCreating="diagram_LinkCreating"
LinkSelecting="diagram_LinkSelecting"
NodeCreated="diagram_NodeCreated"
Drop="diagram_Drop"
Loaded="diagram_Loaded"
[i]DataContext="{Binding Source={StaticResource XMLData}}">[/i]

where I specify a databinding to some xml source and that would draw the diagram based on this xml. Or that I can also use bindings for the shapenodes and also specify them in xaml with the help of datatemplates?

Or can I only specify the diagram itself in xaml and I have to create all shapes, etc. in C#?

Thanks
Kai-Uwe

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: WPF Databinding Support
Reply #1 - Sep 5th, 2008 at 1:04pm
Print Post  
Hi,

There's no support for databinding available yet. You can create the nodes either from C# or throuh XAML:

<mf:Diagram Name="diagram" Bounds="0, 0, 3000, 1000" >
     <mf:ShapeNode mf:DiagramNode.Bounds="50, 50, 100, 100" Shape="Delay" />
</mf:Diagram>

I hope that helps,
Stoyan
« Last Edit: Sep 5th, 2008 at 2:11pm by Stoyo »  
Back to top
 
IP Logged
 
joerg.hubacher
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Sep 5th, 2008
Re: WPF Databinding Support
Reply #2 - Sep 5th, 2008 at 8:48pm
Print Post  
Hi Stoyan,

your answer is really making us nervous. Undecided

One of the main advantages of WPF is the databinding capability to avoid coding. If we would create the model with C# we are back in the old world.

XAML normally makes live easy. Bind a Control to a RessourceDictionary and build the model without writing any line of code. We need to synchronize with a couple of other controls (tree views, lists, etc.). That's basicly is a standard feature of XAML.

You wrote "no support yet". So you have already planed to support it?

Best,
Jörg
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: WPF Databinding Support
Reply #3 - Sep 8th, 2008 at 7:59am
Print Post  
Hi Jörg,

I suppose we'll get to binding in a few months.
From what we know, people would like to get features like exporting to Visio an SVG, which would take more time for you to implement, than creating a diagram from a dataset, which you can do in 20 lines of code. While for us implementing binding will take as much time as say Visio support, so considering the pros and cons of all features in our todo list, binding doesn't have that high priority.

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