Custom Activity control

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.