Workflow 4 活动设计器组合框
我想创建一个活动设计器,显示一个组合框,其中包含来自数据库的值。这可能吗?
我看过活动设计器的示例,但它们都带有 ExpressionTextBox ...
任何帮助,感谢链接,谢谢
I'd like to create an activity designer that display a combo box with values coming from the database. Is this possible?
I have seen example of activity designer, but they are all with ExpressionTextBox ...
Any help, links is appreciated thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当然是。
ActivityDesigner
只是一个 WPF 控件,因此本质上您只想放置一个ListBox
控件位于设计界面上,以您认为合适的方式从数据库加载数据(ADO.NET、Web 服务调用等),然后使用标准 WPF 数据绑定 将该数据绑定到ListBox
。考虑到使用您的控件的人可能需要提供一些设置来连接到数据源(例如服务器名称/地址、用户名、密码等),您可能还希望在设计界面上有一个按钮,该按钮将显示 < a href="http://msdn.microsoft.com/en-us/library/ms749018.aspx" rel="nofollow">
PopUp
或者甚至另一个窗口
,用户可以在其中输入/配置那些设置。Sure it is. An
ActivityDesigner
is just a WPF control, so essentially you just want to put aListBox
control on the design surface, load the data from your database however you see fit (ADO.NET, web service call, etc.) and then use standard WPF data binding to bind that data to theListBox
.Considering that someone using your control will probably need to supply some settings to connect to the data source (e.g. server name/address, username, password, etc.) you will probably want to also have a button on the design surface that will show
PopUp
or maybe even anotherWindow
where the user can enter/configure those settings.我相信这个问题已经在这里得到了回答
I believe this was answered here