Custom Activity control
You can inherit System. Workflow. ComponentModel. Activity to write a function control,
You can also inherit System. Workflow. Activities. SequenceActivity and drag the existing Activity to assemble it.
There is no essential difference between the specific function extension and Integration and the custom components under NET,
However, pay attention to the Execute method of the custom Activity.
Graphical Execute Method
Not familiar with VB.net 2.0. Pay attention to the new event writing method.
Public Class event tag Inherits EventArgs Public ReadOnly event description As String Public Sub New (ByVal description As String) Me. Event Description = Description End Sub End Class |
Public Shared Event As DependencyProperty = DependencyProperty. Register ("Event", GetType (EventHandler (Of Event tag), GetType (custom Activity )) <DescriptionAttribute ("Description")> _ <DesignerSerializationVisibility (DesignerSerializationVisibility. Visible)> _ <ValidationOption (ValidationOption. Optional)> _ <BrowsableAttribute (True)> _ <Category ("group")> _ Public Custom Event As EventHandler (Of Event tag) AddHandler (ByVal value As EventHandler (Of event tag )) MyBase. AddHandler (Event, value) End AddHandler RemoveHandler (ByVal value As EventHandler (Of event tag )) MyBase. RemoveHandler (Event, value) End RemoveHandler RaiseEvent (ByVal sender As Object, ByVal e As event tag) End RaiseEvent End Event |
Allows you to visually design custom controls.
The specific code is not pasted. Download it and check it out.
Download