开发者

Timing execution and loading in Silverlight

开发者 https://www.devze.com 2023-04-12 14:16 出处:网络
I\'m trying to determine some testing strategies for a Silverlight application of ours. What I\'d like to determine is the total time it takes for a grid to load a开发者_开发技巧nd show data in the cl

I'm trying to determine some testing strategies for a Silverlight application of ours. What I'd like to determine is the total time it takes for a grid to load a开发者_开发技巧nd show data in the client. I've tried to put a timer round assigning the itemsource, but I need to know how long it takes the browser is finish loading the data into the grid. Is this at all possible? If so, in what direction do I've to search?


This might help an article on MSDN "Loaded event timing in Silverlight"

http://blogs.msdn.com/b/silverlight_sdk/archive/2008/10/24/loaded-event-timing-in-silverlight.aspx

I think the main idea is to make use of the LayoutUpdated event. Since the event hangs off the FrameworkElement object I guess you could add a handler to all controls and effectively profiler all the framework elements of your Silverlight app. Something similar to the MVC Mini Profiler (SO uses/created this). http://code.google.com/p/mvc-mini-profiler/

I would certainly explore the LayoutUpdated event further.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号