silverlight中dialogresult和close

來源:互聯網
上載者:User

標籤:blog   http   ar   io   os   sp   for   on   問題   

最近在一個silverlight的項目中,發現到一個詭異的bug,表現為:

1.連續開啟或者關閉ChildWindow 可能導致主表單被disable;

2.開啟/關閉兩個不同的ChildWindow 可能導致主表單disable;

 

這裡:http://forums.silverlight.net/forums/p/176423/424519.aspx 也有人在討論該問題。

目前基本上可以是由控制項自己內部本身的錯誤引起的,臨時的解決方案為:

1.設定DialogResult的值後不要調用close方法;

2.在關閉ChildWindow時候調用:

Application.Current.RootVisual.SetValue(Control.IsEnabledProperty, true);

強制設定父表單為enbale

 

這個臨時的解決方案看起來有點彆扭,當然你也可以重載ChildWindow,在衍生類別中override OnClosed方法

轉自:http://www.cnblogs.com/biduan/archive/2010/06/20/1761579.html

silverlight中dialogresult和close

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.