增加的子类别的依赖性工作流程中的活动
-
05-07-2019 - |
题
我希望创建一个工作流程的活动,具有依赖性结构这样
- 设置
- 等待期
- 天
- 小时
- 分钟
- 等待期
在目前的代码下面将显示 设置 与 等待期 作为一个整数,但现在需要展开了3次儿童性 天, 小时 和 分钟.
我理解我会有改变 等待期, 但我不知道该如何去关于附加的其他3个属性。
任何帮助,将不胜感激...谢谢。
public static DependencyProperty WaitPeriodProperty = DependencyProperty.Register("WaitPeriod", typeof(int), typeof(CheckActivity));
/// <summary>
/// Dependency property for 'Wait Period'
/// </summary>
///
[DescriptionAttribute("The email of the sender")]
[CategoryAttribute("Settings")]
public int WaitPeriod
{
get
{
return (int)(base.GetValue(CheckActivity.WaitPeriodProperty));
}
set
{
base.SetValue(CheckActivity.WaitPeriodProperty, value);
}
}
解决方案
首先你肯定应该改变的类型 int
要 TimeSpan
.有天、小时、分秒和毫秒。
输入UI可能不是自己的喜好的,虽然它只是一串:d。hh:mm:ss。毫秒
但是我个人会忍,为简单起见,使用了一类特别设计的任务。它也许有可能创建一个自定义的编辑。
不隶属于 StackOverflow