开发者

Custom base class for workflow activity , how to declare dependency property?

开发者 https://www.devze.com 2022-12-26 05:52 出处:网络
Generally we derive a custom activity from Activity or CompositeActivity class, I want to have my custom base class for all ac开发者_运维百科tivities like:

Generally we derive a custom activity from Activity or CompositeActivity class, I want to have my custom base class for all ac开发者_运维百科tivities like:

public class BusinessActivity : Activity
{

}

then my custom activities will derive from BusinessActivity.

The question is if I want ErrorMessageProperty and RetryCountProperty as dependency properties, then in the BusinessActivity, how do I declare the third param in Register method:

 public static DependencyProperty RetryCountProperty = DependencyProperty.Register("RetryCount", typeof(int), typeof(**BusinessActivity**));

What will happen if I derive from BusinessActivity class?

0

精彩评论

暂无评论...
验证码 换一张
取 消