父窗体代码
private void DGUserEdit() { if(DGUser.SelectedItem!=null) { DataRow dr = (DGUser.SelectedItem as DataRowView).Row; Page.UserEdit UE = new UserEdit(UserGrade, dr["UserName"].ToString());//声明子窗体 UE.Closed += new EventHandler(UE_Closed);//注册关闭事件 UE.ShowDialog(); } } //在子窗体的关闭里写要刷新的内容,我这是重写绑定 private void UE_Closed(object sender,EventArgs e) { Band(); }
WPF 子窗体关闭,刷新父窗体
时间: 2024-10-10 11:39:41