您的位置:首页 > 其它

自定义被封装的工作流控件方法

2008-03-06 22:12 323 查看
自定义类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

{

{

{

base.RemoveHandler(onTaskChanged_IsTaskCompleteEvent, value);

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: