自定义类TaskEventArgs继承EventArgs,如果onTaskChanged控件需要自定义方法,那么先定义该方法属性,DesignerSerializationVisibilityAttribute,BrowsableAttribute,CategoryAttribute,定义EventHandler<TaskEventArgs>类型的方法,具体代码如下:TaskEventArgs.cs using System;using System.Collections.Generic;using System.Text;using System.Workflow.Activities;using Microsoft.SharePoint.Workflow;namespace wfACT 自定义方法: public static DependencyProperty onTaskChanged_IsTaskCompleteEvent = DependencyProperty.Register("onTaskChanged_IsTaskComplete", typeof(System.EventHandler<wfACT.TaskEventArgs>), typeof(wfACT.TaskActivity)); [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)][BrowsableAttribute(true)][CategoryAttribute("TaskChanged属性")]public event EventHandler<TaskEventArgs> onTaskChanged_IsTaskComplete 相关文章: