在Silverlight中,我使用了一個配置文件窗口,並且可以選擇在超鏈接按鈕中刪除當前配置文件。當用戶點擊超鏈接按鈕時,它會將它們帶到一個新表單中以確認刪除。雖然刪除功能已經起作用(即,配置文件已從數據庫中刪除),但如何在用戶確認後獲得第一個關閉的窗口?從當前窗口關閉上一個窗口
這是從那裏dProfile
calls-
private void deleteProfile(object sender, RoutedEventArgs e)
{
deleteProfile dProfile = new deleteProfile();
dProfile.textBlock1.Text = System.Convert.ToString("Delete " + lblMsg.Content);
dProfile.Show();
}
隨後的超級鏈接我要關閉profileForm
的超級鏈接坐鎮當用戶點擊確定 - 什麼
private void OKButton_Click(object sender, RoutedEventArgs e)
{
textBlock1.Text = "Profile Deleted.";
profileForm.Close();
Close();
}
然而dProfile
當我創建它的新實例時,表單只能識別profileForm
,我如何引用當前正在使用的實例?
輝煌代碼/答案。 – Ebikeneser
出於興趣,我在Silverlight應用程序的主頁面中有一個列表框,它具有一個列表框,當用戶選擇一個項目時,打開profileForm,然後dProfile窗體成爲第三階段。當用戶在dProfile表單上單擊確定時,是否可以刷新主頁中的列表框? – Ebikeneser
只是說列表框與web服務調用相關聯。 – Ebikeneser