This project has moved. For the latest updates, please go here.

By default the Visualization Client that is distributed with the Visualizer comes with no diagrams or configuration. When you launch the Visualization Client and click on either "Change Diagram" or "Connect" you will be presented with an empty option list (like below)

In order to get the visualizer to load diagrams and connect to a server, you will need to deploy the WEB folder (in the install directory) to a web server. Doing this is outside of the scope of this documentation, I will assume you've deployed it to localhost:8008

Our first task, is to instruct the Visualizer Client to load a configuration file, this is done by editing the default.html file (or the approporiate <object...> tag in your source code).

Make sure the following initparams are specified:

 <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
             <param name="source" value="ClientBin/MARC.EHRS.VisualizationClient.Silverlight.xap"/>
         <param name="initparams" value="config=http://localhost:8080/visualizer.xml" /> ...

Where config= points to the appropriate configuration file. Next, you'll have to ensure that the configuration file exists. Using your favourite text editor, create the file specified in your initparams. Create an empty file that looks like this:

 <configuration xmlns:xaml="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
         </configuration>

This represents an empty configuration file that the visualization client will read. Next, we need to register diagrams with the configuration file. To do this, add a diagram element to the configuration section. If you're using the sample XAML file available from the downloads seciton, your config file would look similar to the following:

 <configuration xmlns:xaml="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
            <diagram src="http://localhost:8080/SAMPLE.XAML" name="A Sample Diagram"/>
         </configuration>

If you visit http://localhost:8080/default.html and click "Change Diagram" you will be presented with the contents of your config file. The following example illustrates my demo environment:

If you select the sample diagram your visualizer client should display the empty diagram. Next we need to let the client know what visualization servers are available in the Connect dialog. To do this, add server elements to your diagram. If you're attempting to connect to a local server you can use the following exmaple file:

 <configuration xmlns:xaml="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
            <diagram src="http://localhost:8080/SAMPLE.XAML" name="A Sample Diagram"/>
            <server address="127.0.0.1" port="4530" name="Local Server" imageSrc="http://localhost:8080/sampleServer.png"/>
         </configuration>

The server element contains more attributes than the diagram element. The address attribute instructs the client the IP address or host name that is running the visualization service. The port attribute specifies the port that notifications are broadcast on. The imageSrc is a graphical representation of the server. If you have a logo (or many different servers) this can help the user distinguish between them

Finally, you can specify some data inside of the "about" dialog by simply using XAML markup within the root element. For example, if I wanted a paragraph that explains my product in the visualizer (for clients to read) you can simply use the following configuration:

 <configuration xmlns:xaml="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
            <diagram src="http://localhost:8080/SAMPLE.XAML" name="A Sample Diagram"/>
            <server address="127.0.0.1" port="4530" name="Local Server" imageSrc="http://localhost:8080/sampleServer.png"/>
            <xaml:Paragraph>
                <xaml:Run>Product A communicates with Product B using IHE PIX/PDQv3, Product A is distributed by</xaml:Run>
                <xaml:Hyperlink NavigateUri="http://www.mohawkcollege.ca">Mohawk College</xaml:Hyperlink>
           </xaml:Paragraph>
        </configuration>

Last edited Jun 30, 2015 at 4:58 PM by jf03cg, version 2