Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Dock > Bounds cannot be changed while locked

Not answered Bounds cannot be changed while locked

Feed from this thread
  • Ching-Yen avatar

    Posted on Jul 24, 2008 (permalink)

    Hi,

    For sometime, we are facing error code as below during app loading

    Bounds cannot be changed while locked.(Telerik.WinControls)


                ' Place docking Pane
    39:         _LeftDock = New _PaneLeft()


    But, if we kill the application and restart, then the issue won't be appear...

    Please advice.

    Reply

  • Julian Benkov Julian Benkov admin's avatar

    Posted on Jul 25, 2008 (permalink)

    Hi Ching-Yen,

    I was able to reproduce it. Currently, we are not quite sure what is the exactly cause for that.

    It would help us if you send us a simple example to reproduce problem locally. Thank you in advance.

    Sincerely yours,
    Julian Benkov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Ching-Yen avatar

    Posted on Jul 25, 2008 (permalink)

    Hi,

    Do you mean you able to reproduce it rite?

    Another issue is...the issue does not appear consistently in my big project too... I have no clue how to reproduce it on a simple project.

    Reply

  • Angel Angel admin's avatar

    Posted on Jul 28, 2008 (permalink)

    Hello Ching-Yen,

    Thank you for writing.

    This sounds like a multithreading issue.
    The exception is shown when something in the layout is modified from a thread different than the painting one.
    In the current implementation we lock the layout while painting to avoid glitches caused by animations or user code.

    We intend to make our controls more thread-safe and user friendly in multithreading scenarios in the future.
    However, this task is non-trivial and I cannot give you a timeframe when it will be done.

    Meanwhile, you will have to avoid direct access of methods and properties from threads different than the main UI thread. In order to ensure the call is in the stack of the UI thread, you have to use Invoke() or BeginInvoke().
    There is a good article in the CodeProject on the subject.

    If you have further questions do not hesitate to write us.

    All the best,
    Angel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Arulanandham avatar

    Posted on Jan 9, 2012 (permalink)

    Hi,

    We are using Q2 2010(.713) version for our application. We have faced the same problem in our application also.

    System.InvalidOperationException: Bounds cannot be changed while locked.

    at Telerik.WinControls.RadElement.SetBoundsCore(Rectangle bounds)

    at Telerik.WinControls.RadElement.set_Bounds(Rectangle value)

    at Telerik.WinControls.UI.RadTreeView.DoLayout()

    at Telerik.WinControls.UI.RadTreeView.OnLayout(LayoutEventArgs args)

    at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)

    at System.Windows.Forms.Control.PerformLayout()

    at Telerik.WinControls.UI.RadTreeView.InvalidateLayout()

    at Telerik.WinControls.UI.RadTreeView.CollapseAll(RadTreeNodeCollection nodes)

    at Telerik.WinControls.UI.RadTreeView.CollapseAll()

    And we have used in the UI thread only. Could you please help me how to avoid these error in this version?

    Also Please clarify that whether it is good to suppressed the below exception?

     

    Thanks

    Arul

    Reply

  • Julian Benkov Julian Benkov admin's avatar

    Posted on Jan 12, 2012 (permalink)

    Hello Arulanandham,

    Thank you for contacting us.

    We can not reproduce the issue by following your information. Please give us a more detailed description of used scenario, threads and synchronization logic. A simple application that demonstrates the issues will be greatly appreciated.

    Please note that you have to open a new support ticket in order to be able to attach your files.

    Also, please keep in mind that this version of RadTreeView control uses some part of old layout system and calculation. My advice is to upgrade your application to last Q3 2011 SP1 release and use the new version of RadTreeView control that contains greater functionality and improvements, new data engine, new layout system - flexible and customizable node elements.

    I am looking forward to your reply.

    Regards,
    Julian Benkov
    the Telerik team

    SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Dock > Bounds cannot be changed while locked
Related resources for "Bounds cannot be changed while locked"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]