Databinding sample in


I am evaluating your software and was wondering if you could provide a quick databinding sample in to a sample xml or database file. Thanks in advance.

Perhaps this will help:
FlowChartVB sample

Thanks Walter for the example. I know this is trivial, but could you provide a sample app with the node collection coming from an access database? Thanks alot for your time and effort.


Sorry, but I haven’t done any Access programming in many years.

But to give a general idea: videos about building Silverlight Business Application using WCF RIA Services

OK, I am having problems with populating the diagram view with nodes from a WCF service pulling information from either a MSAccess or SQL server database. Here is my xaml code:

Private sub BindClient
Dim client As New ServiceReference_AssetNetworkData.svcAssetNetworkDiagramClient
AddHandler client.GetDataCompleted, AddressOf asset_GetDataCompleted
end Sub
Private Sub asset_GetDataCompleted(ByVal sender as Object, ByVal e as ServiceReference_AssetNetworkData.GetDataCompletedEventArgs)
end sub
Please advise.

Have you checked the value of “e.result”? Is it what you expected? Does your data template use the proper bindings to get to the desired values?

What exactly is the problem that you are having?


e.result is a collection of data similar to how you generated in your xml file in the above example. I am having problems passing that data into a "node" format. Any ideas?

That sounds like a traditional data-binding task.

Are you able to data-bind controls outside of the Diagram to one of the items in your result collection?


OK, then you want to do exactly the same kinds of element organization and data-binding within your Node DataTemplate, except that the Bindings should all have their Path prefixed with “Data.”

And most of the GoXam-specific attached properties can be set or data-bound on the root element of the DataTemplate.

All of the samples in the demo exhibit many examples of this.

The other optional step is diagram-specific. That is to customize the model so that it recognizes any diagram relationships in the data: links and groups. Because you aren’t using the predefined model data that GoXam supplies, this is likely to be important to you. The User Guide discusses the different kinds of models and how to do this customization.

Hi Walter,

I haven't found a good example for taking data from a backend database and populating a diagram.
I am basically pulling a collection from a WCF service. Then I am setting the nodes source to my e.result. Does this autofill the diagram? Do I need to sort through the collection individually?
You don't really have the documentation to support these questions.
A simple example might solve alot of the questions I have with regard to your product. Thanks.

Yes, it does automatically populate the Diagram, or the Palette in your case.

Have you specified a Diagram.NodeTemplate for the Palette? The default DataTemplate is basically a TextBlock that shows the result of data.ToString().

You haven’t said what results you are getting and how it’s different from what you want.

Hi Walter,

I have set the node template to a staticresource which I define in xaml. Purchasing GoDiagram hinges on me being able to populate the diagram with node data from my sql database. My code is in VB.NET. If there is any way you can provide a brief example of how to pull data from a sql database into the GoXam interface using WCF services I am hooked on your software. If not, I really don't want to spend a whole lot of time evaluating your software.
Thanks in advance.

The videos at GoXam documentation provide exactly that: an example of how to read data from a SQL database running on a server into a GoXam for Silverlight Diagram.

The videos go through the entire process of building the whole (but simplified) org chart application.

If you want some help with defining the Node DataTemplate, you’ll need to tell us what properties are being exposed by your data and what you want your node to look like.