The VG.net vector graphics Picture designer, integrated in Visual Studio .NET, can export to an xml file in the MyXaml format. MyXaml is XAML for Windows Forms developers. Originally we wished to use the MS-XAML format, but the resulting markup was clumsy. So we switched to MyXaml, a generic format for serializing any .net object graph. In this XAML wiki page on channel9, I describe the problems we had with MS-XAML. Go to the wiki page and scroll down to the section titled “MS-XAML Is Neither Generic Nor Domain-Neutral”.
Marc Clifton has created a MyXaml export component you can use within the Visual Studio .NET Windows Forms designer. It was already possible to export to vector graphics to MyXaml files from the VG.net designer; now you can export Forms and UserControls as well.
We are working on a SCADA display screen sample using VG.net vector graphics. In the image above, you can see three instances of a tank assembly class. Each tank assembly consists of a tank and a pump (the pump has a red interior).
Because all the graphical components you see are .NET classes, each component can have custom properties, methods, or events. In the case of the pump, we created a boolean property you modify to indicate if the pump is on or off. This causes the color within the pump to change from red to green -- gaudy colors, but standard in the industry.
In the case of the tank, we created a Volume property, from 0 to 1, indicating the percentage of contents in the tank. Change the volume, and the gauge on the tank goes up and down. We will be adding another property to change the color of the gauge in each tank, to distinguish the contents in each tank. We will also add a numeric volume indicator and tick marks.
Pipes and tanks are created very easily in VG.net, thanks to the linear gradient fill type. There is one setting on a gradient, bell curve, that produces perfect 3D cylinders, without having to specify any intermediate gradients. The Focus property adjusts the angle of light on a cylinder.
I will post more details on this screen and its components as they evolve. I will also post an executable you can download to see the screen animated with simulated real-time data.
The MyXaml web site has been completely redone -- check out the new look: