3jp手机电影下载,非你莫属20130420,挂烫机
当使用 showdialog() 方式显示窗口时,通过定义附加属性的方式可实现在 viewmodel 中进行数据绑定(bool?)来控制子窗口的显示和关闭
public class exwindow { public static bool? getdialogresult(dependencyobject obj) { return (bool?)obj.getvalue(dialogresultproperty); } public static void setdialogresult(dependencyobject obj, bool value) { obj.setvalue(dialogresultproperty, value); } // using a dependencyproperty as the backing store for dialogresult. this enables animation, styling, binding, etc... public static readonly dependencyproperty dialogresultproperty = dependencyproperty.registerattached("dialogresult", typeof(bool?), typeof(exwindow), new propertymetadata(true, (d, e) => { var handler = d as window; handler.dialogresult = e.newvalue as bool?; })); }
当主窗口的显示和关闭也想通过在 viewmodel 中来进行控制的话可以通过事件和消息级制来实现,具体可参考 mvvm light 中的 messenger 使用方式
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Blazor server side 自家的一些开源的, 实用型项目的进度之 CEF客户端
.NET IoC模式依赖反转(DIP)、控制反转(Ioc)、依赖注入(DI)
vue+.netcore可支持业务代码扩展的开发框架 VOL.Vue 2.0版本发布
网友评论