工作流依赖属性
我有一个带有 name 属性的 Person
类。
我有一个自定义活动,该活动将此 Person 对象作为依赖属性。
现在,当我将此自定义活动放入工作流设计器中时。我可以在属性网格中看到该人。
我希望设计师能够指定该人的姓名。
这可能吗?或者唯一的方法是在我的自定义活动中真正创建一个名称属性。
I have a Person
class with a name property.
I have a custom activity that have this Person object as a dependency property.
Now when I drop this custom activity into the workflow designer. I can see the Person in the property grid.
From the designer I'd like to be able to specify the name of the person.
Is this possible? Or the only way is to really create a Name property in my Custom activity.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于这个问题已经很长时间没有答案了,我将添加一个答案,因为它可能会对某人有所帮助。
据我了解,您有一个对象 x 存储在控件的属性中,并且您想显示对象 x 的属性。
一个例子是包含人员数组的组合框。但您不希望人员显示在组合框中。您可能想显示他们的名字。
您可以通过设置
DisplayMemberBinding="name"
来实现此目的。Since this is unanswered for ages now I'll add an answer because it might help someone.
From what I understand you have an object x stored in a property of control and you'd like to show a property of the object x.
An example could be a combobox which contains an array of person. But you don't want person to show in the combobox. You might want to show their names.
You can achieve that by setting
DisplayMemberBinding="name"
.