Load layout "sequentially"?

2 posts, 0 answers
  1. Marcel
    Marcel avatar
    21 posts
    Member since:
    Jul 2011

    Posted 18 Apr 2014 Link to this post

    Hi there,

    is there a way to not have "LoadLayout" load everything at once but in a sequential way one pane after the other has finished? My Problem is that my application can host many different types of views in a dock manager and some of those views are quite complex. Loading them alone has quite good performance but when the app deserializes the layout and 10 or more panes are created at once, the app hangs for some seconds before the views actually start doing something (I designed them to show what they are doing during initialization - like e.g. filling data into a data grid).

    The app is using a bound collection of view models in the dock manager (like from the Prism example), which are then translated to views via data templates. That could probably make it complicated to find out when a pane is completely loaded, I guess...

    The described problem is not really a showstopper but it would be great if I could make the app startup a little bit smoother since responsiveness is a big topic in todays applications.

    Regards,
    Marcel 
  2. George
    Admin
    George avatar
    1332 posts

    Posted 22 Apr 2014 Link to this post

    Hi Marcel,

    Loading the layout of Docking control is not a heavy operation by itself and 10 and more panes should not cause any performance issues. As you noted, there could be heavy UI placed in their content and this slows down the application. However, there is ElementLoaded event which is fired after a docking element is loaded and this event could help. For example, if can be used for setting a content of the loaded pane, or even start some data operation asynchronously. You can find a sample code here - http://www.telerik.com/help/silverlight/raddocking-save-load-the-content-of-the-panes.html

    Hope this information helps.

    Regards,
    George
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top