当前对话服务
允许您管理当前可见的对话框。
接口
DevExpress.Mvvm.ICurrentDialogService
注册
仅当存在激活对话框时才存在服务 – 您无法注册 CurrentDialogService。
Create() Methods
None.
公共服务方法
- Close(), Close(MessageResult dialogResult) 和 Close (UICommand dialogResult) – 用给定的 DialogResult 关闭一个对话框。 如果结果是 UICommand 类型,则调用相关的 UICommand。 请注意,您只能使用最初在 ShowDialog 方法中传递给对话服务的 UICommand当中的一个。
- WindowState – 此属性允许您更改对话框的窗口状态(正常、最小化或最大化)。
CurrentWindowService
类似于 CurrentDialogService,但允许您管理当前的应用程序窗口(窗体)。
接口
DevExpress.Mvvm.ICurrentWindowService
全局注册
无法使用。
本地注册
C#
mvvmContext1.RegisterService(CurrentWindowService.Create(this));mvvmContext1.RegisterService(CurrentWindowService.Create(listBoxControl1));
VB.NET
mvvmContext1.RegisterService(CurrentWindowService.Create(Me))mvvmContext1.RegisterService(CurrentWindowService.Create(listBoxControl1))
Create() Methods
- Create(Control container) – 允许您为托管分配为方法参数控件的任何表单注册服务。
- Create(Form currentForm) – 为此表单注册服务。
- Create(Func<Form> getCurrentForm) – 为 getCurrentForm 方法返回的任何表单注册一个服务。
公共服务 API
- Activate(), Close(), Hide() 和 Show() – 允许您控制当前窗口的可见性。
- WindowState – 此属性允许您更改窗体的窗口状态(正常、最小化或最大化)。
DevExpress WinForm | 下载试用
DevExpress WinForm拥有180+组件和UI库,能为Windows Forms平台创建具有影响力的业务解决方案。DevExpress WinForms能完美构建流畅、美观且易于使用的应用程序,无论是Office风格的界面,还是分析处理大批量的业务数据,它都能轻松胜任!
更多产品正版授权详情及优惠,欢迎咨询在线客服>>
DevExpress技术交流群5:742234706 欢迎一起进群讨论

标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!