WPF中Storyboard動畫延遲的一個BUG(缺陷?)

來源:互聯網
上載者:User

做項目的時候涉及到一個翻頁效果,具體就是把一塊panel從左側淡出,更新panel上的內容,然後從右側淡入,給人的感覺就像換了一頁一樣。

具體執行流程:

按下一個按鈕後:

1、Stroyboard A :將panel從左側淡出。

2、讀取資料庫,更新panel中ListView的內容。

3、Storyboard B : 將panel從右側淡入。

 

做完後我F5,然後一下一下的按按鈕測試,前5下都是正常的,動畫流暢,沒有不妥,但是再繼續按下去,Storyboard B慢慢的出現了延遲,等到按了10多下後,動畫B延遲非常嚴重接近1S,20~30下後,動畫B基本不顯示,直接動畫A,然後卡一下,出現panel。

 

實驗多次,排除了很多潛在幹擾因素後基本認定,這是WPF動畫的一個缺陷。

 

The problem can be summaried as this :

Paly Storyboard Animation A;

Do some data work(like add items to listview, database access);// If you do nothing here, there wii be no delay!

Play Storyboard Animation B;

Run it for 10 or 50 times, the Storyboard Animation B will badly delay!

英語不好,去MSDN問了也沒得到解決,希望微軟早日解決這個問題,嚴重影響使用者體驗啊~~~

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.