Silverlight is a cross-browser, Cross-platform,. NET Framework implementation. Has the following advantages:
Provides a consistent experience, and it doesn't matter where it is run
It streams video and audio. It adjusts video quality to suit a variety of environments: from mobile devices to desktop browsers and 720p HDTV video modes
2D and 3D graphics that users can manipulate (drag, rotate, and zoom) directly in the browser
We can use it directly on the Web to complete the workflow process definition, direct drawing can be stretched, drag and drop of complex graphics, to obtain a very good user experience. This has been done in the past only through GDI + or some other unfriendly method. The important thing is that the code for this implementation is very concise.
You need the following tools to implement:
1.Visual Studio 2008
2.vs2008sp1
3.Silverlight Tools
4.Expression Blend2
Have a detailed understanding of the Silverlight drawing plane before you complete the drawing.
Silverlight provides three root layout objects to define the entire drawing surface, and the layout objects of these three drawings are derived from the panel element to enable many complex layouts.
Canvas |
Defines an area within which you can explicitly position child elements using coordinates relative to the Canvas region. |
Grid |
Defines a flexible grid area made up of rows and columns. |
StackPanel |
Arranges child elements in one row (in either horizontal or vertical direction). |
In this walkthrough we will use the grid element to complete the layout of the page. Use canvas to define the entire drag-and-drop drawing surface, and use the StackPanel element to arrange the custom active node user control.
Two important objects are involved in this process
1. Node objects define each activity of the workflow, you can display an active personality icon, name and so on information, to be free to drag, drag the relevant coordinates of the activity between the lines can be automatically drawn.
2. Line can be free to stretch the direction of the polyline, the end of the drawing arrows, the process of drawing to achieve dynamic effects, automatic bonding node objects.
To draw a node object with Blend2