Slow Repaint of all controls with in a tab of TabStrip control

10 posts, 0 answers
  1. Tina
    Tina avatar
    2 posts
    Member since:
    Apr 2008

    Posted 07 May 2008 Link to this post

    Hi,

    I am using Tab strip as a tab control. And have a lot of controls in each tab. When resizing or changing between the tabs, all controls render very slow, it seems to repaint all the controls. Can i improve performance or stop it to do the repaint.
    I am using Q1 2008.

    Thanks
    Tina
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 09 May 2008 Link to this post

    Hi Tina,

    Thank you about your questions.

    There is a refresh/invalidate operation every time you move or resize a window, but you actually do not see any flickering if the control is using double buffering. This is the case with the standard panels coming with from the Visual Studio toolbox - they do not support double buffering and there is flickering. There are various techniques which could help you boost the performance. Still, I think that I could help you faster if you send me a very simple project with the exact scenario.

    For example, you can try the following:

    When you start resizing, simply hide the panels of the tabs and when you finish the resizing, show them again. You can also start a timer in the Resize or SizeChanged event handlers which is stopped in the Tick event handler of this timer and in the tick handler you can also show the panels.

    The property you should use to get the content panel is the ContentPanel of TabItem.

    I hope this helps.

    Kind regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 12 Jun 2008 Link to this post

    I also notice the slow re-painting when using the tab strip, but in my case it seems that the tab strip repaints the content panel even if it is not visible at all.

    It seems that the Tab Control forces a repaint of the content panel(s) in cases it shouldn't.

    I use UserDockForms that have a tab strip on them. (Default Theme on all). Now when I open a new UserDockForm over existing UserDockForms that have a TabStrip on them, I can see the (hidden) content panels repainting, before the new UserDockForm displays.
     
    This is most noticable when the  control default theme is used wich renders a gradient. It also leads to slower and slower opening time of new Documents (UserDockForms) depending on how many UserDockForms are already open. (See my post in the Docking Forum - seems I can nail it down to the TabStrip.

    The problem seems to bee even worse when a Tab Content panel has a TableLayoutPanel on it possibly with some cells set to Transparent.

  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 13 Jun 2008 Link to this post

    Hi erwin,

    Thank you for writing.

    This is a known issue - RadTabStrip is drawn more slowly when the content panel has a gradient fill or its backcolor is set to transparent. I suggest not setting a gradient backcolor of the tabItems' contentpanels. You can use the code below to set a solid background:

    this.tabItem1.ContentPanel.BackColor = Color.White;

    We are working on improving RadTabStrip performance, so please keep track of new releases of our controls. Please send me a project demonstrating the issue, and I will try to figure out a workaround for your specific case.

    I'm looking forward to your reply.

    All the best,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Guillaume Crétot Richert
    Guillaume Crétot Richert avatar
    33 posts
    Member since:
    Oct 2008

    Posted 12 Dec 2008 Link to this post

    Hi,

    I'm getting heavy flickering with tablelayout panels and tabstrips as well. I've packaged a few controls I use in my project inside a separate, self-contained project. To do this I've had to remove all data-binding from the controls, as well as other loading code. This makes flickering slightly less aggravating, but it is still present in this standalone project. How would I go about sending this project to you in order to get workarounds until we can get a flickering-free version of Telerik controls?

    By the way, when can we expect such a version?

    Thank you,
    Guillaume.
  7. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 15 Dec 2008 Link to this post

    Hello Guillaume Crétot Richert,

    Thank you for this question.

    I suppose that the flickering experienced is caused by the usage of TableLayoutPanel, but not by RadTabStrip. Please refer to the following Knowledge Base article which will help you to overcome this issue: Panels and Transparency - Resizing (part ||).

    If you still continue to encounter this problem, please open a new support ticket and send me a sample project which demonstrates them. This will allow me to provide you with further assistance.
     

    All the best,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Guillaume Crétot Richert
    Guillaume Crétot Richert avatar
    33 posts
    Member since:
    Oct 2008

    Posted 16 Dec 2008 Link to this post

    Preliminary tests show that your solution works perfectly.

    Thanks!
  9. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 16 Dec 2008 Link to this post

    Hello Guillaume Crétot Richert,

    Thank you for getting back to me. I am glad to hear that your issue is resolved.

    Regards,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  10. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 22 Dec 2008 Link to this post

    Changing backgrounds does not really cure the initial problem of inefficient drawing code within radtabstrip and docking.
    The paint procedures are sometimes called even when the tab page is not (and does not become) visible. If a tab page contains a control that does not support double buffering (such as the splitter container) it paints "through".
    Chage to a solid background color just makes (unneeded) painting faster, but the paint handler for hidden tab pages should not be called in the first place.

    Erwin

  11. Nick
    Admin
    Nick avatar
    767 posts

    Posted 23 Dec 2008 Link to this post

    Hello erwin,

    Thank you for your feedback. It sounds as an issue indeed but we cannot reproduce it. Can you send us a sample project? Thank you very much in advance.

    Regards,
    Nick
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for WinForms is Visual Studio 2017 Ready