Migation of C# desktop app to silverlight web app?


We have developed windows deesktop application (C#) using GoDiagram Win component.
Now we are planning to migrate our applicaion to Silverlight webbased platform.
So is it possble to migrate GoDiagram Win component to Silverlight webbased platform without changing existing implmentation?
What are the steps required to migrate it successfully?
Please let me know as soon as possible.

Well, the same team that wrote GoDiagram wrote GoXam. But the goal was to make GoXam integrate tightly with the XAML environment. So… the concepts at a high level are the same, but the implementation is very different. In short, there’s probably none of your GoDiagram code that is going to “port”, but you’ll very quickly go “oh, I see. this is cool”. The whole Model-View-ViewModel and data binding in XAML are very slick.

start here: http://www.nwoods.com/components/silverlight-wpf/goxam-documentation.htm

Skim through the Intro, watch the videos… then play with the samples.

Hi Jake,

I have already implemented classes, which are derived from GoView, GoLink, GoLabel, GoText, GoIconicNode, GoGroup, GoToolManager classes.
So will these classes available with GoXam libraries?
If not, then how can I reuse my existing implementation with less changes using GoXam libraries?

Please provide me some dummy sample or hint.


There are equivalents of all of those, but the names aren’t always the same. Nodes and Links are defined in XAML templates.

For example, here is an iconic-like node from Update Demo in GoXam:

<DataTemplate x:Key="NodeTemplate2">
  <StackPanel go:Part.SelectionAdorned="True"
              go:Node.Location="{Binding Path=Data.Location, Mode=TwoWay}">
    <Ellipse Fill="LightGreen" Width="30" Height="30"
             go:Node.LinkableFrom="True" go:Node.LinkableTo="True" />
    <TextBlock Text="{Binding Path=Data.Key}" Foreground="Green"
               HorizontalAlignment="Center" />

That’s it… that’s all the “node” code in the app. This creates a node with a little green circle stacked over a Text label. Note this also binds the Location and Text Label to the data model, so that’s done here too. An edit to the text changes the underlying data model, and a change to the underlying data updates the diagram. A lot of times, without a line of code.

Watch the 2 Silverlight Business App / Orgchart videos. It’s been a while since I did those, but I think I do the whole thing with 1 or 2 lines of C# code.

Will you be able to reuse some of your code? I really can’t answer that, it depends on what it does and how you’ve structured it. My point here is that you may not even need much of what you did in GoDiagram, there are other, simpler ways to achieve a “diagram”.

Other stuff may port easily… our layout code, since it is a fairly abstract layer (you build a separate “Network” from your GoDocument, the layout code operates on that and then move the actual nodes) is VERY similar between GoDiagram and GoXam.

Hi Jake,

Can we also set image for a node in GoXam?

oh, sure. I just grabbed the first close bit of XAML I could find. See the BeatsPath sample.

OK… I’ve moved your post to the GoXam forum, under title “Set Image Icon in code”.