As with many other technologies, the design time experience in Windows Workflow Foundation uses many of the same extensibility mechanisms found in other designers (such as the Windows Forms designer). One of those is the hability to provide custom type editors for properties by creating an UITypeEditor-derived class and then associating it with the property via the [Editor] attribute.
Here's a sample UITypeEditor that will present an OpenFileDialog to choose a file name as the property value:
You can then easily associate it with a property like this:
One thing to watch out for, though, is that at least with the July CTP of WinFX, WF will completely ignore your custom UITypeEditor if it is defined in the same assembly as the activity using it. Don't know why, but make sure you define it in a separate assembly you reference, and it should work OK.
本文详细介绍了如何使用自定义类型编辑器为Windows Workflow Foundation提供个性化的属性编辑体验,通过创建并关联特定类实现弹出文件选择对话框的功能。
2239

被折叠的 条评论
为什么被折叠?



