工作流依赖属性

发布于 2024-08-13 08:58:12 字数 199 浏览 3 评论 0原文

我有一个带有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温暖的光 2024-08-20 08:58:12

由于这个问题已经很长时间没有答案了,我将添加一个答案,因为它可能会对某人有所帮助。

据我了解,您有一个对象 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".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文