Latest Source code Download: http://www.shareidea.net/opensource.htm
Latest Version Online Demo: http://www.shareidea.net/workflow.htm
This is almost the end of the program, but there are a lot of friends who want to continue to refine the program and add content about the workflow attributes, to continue the series as requested by your friends, and to add some content to the process attributes. Workflow is widely used in modern enterprises, this article does not insist to complete a all-inclusive process application, but to do a framework class things, easy to carry out two times development and expansion.
As you can see from the foregoing, this article rarely comes directly to the code, but focuses primarily on the problems encountered in authoring an application and the ways and means to solve them (including, of course, the problems encountered with Silverlight). And explain the reasons for the trade-offs between multiple methods of solving a problem. Of course, the reason is not absolute, according to the passage of time and the extension of ideas, we can also find a more appropriate way to solve the problem.
In this process of learning Silverlight, I hope to share with you the learning experience, about Silverlight, about system design, as long as it makes me feel more fresh and interesting. Also hope that you prawns, novice a lot of guidance.
Five Landscaping
There are a lot of things that need to be beautified, and the part that you think of and intend to do is as follows:
Rule uses a straight line with an arrowhead
Activities show different shapes depending on the type of activity.
Interface adjustment
5.1 rule using a straight line with arrows
The line class in Silverlight does not find the attribute to set the arrow, so we have to make an arrow on the tail of the rule, and there are two ways to think of it:
Use a picture of an arrow on the tail of the rule.
Write yourself a class that represents the arrows, and place the class on the tail of the rule.
For both methods, it involves a problem, that is, according to the rules in different positions, the direction of the arrow to change the angle of the rule to make a change to adapt to the rules of the angle.
The first method is relatively simple, but the use of a picture is to increase the size of the client download content, as well as inconvenient to change the display color, each change color to change the new picture, inconvenient. So we're going to write our own class that represents the picture, in the tail of the rule.
This class inherits from System.Windows.Controls.Canvas, we call it arrowhead, the Arrowhead class contains two child controls, two lines (line) classes, which are arranged in different angles to form an arrow, Similar to the following graphic:
Placing this class at the end of the rule class forms a straight line with an arrowhead, as follows:
This uses several objects to synthesize a straight line with an arrowhead.