The calling thread must be STA

5 posts, 0 answers
  1. John Giblin
    John Giblin avatar
    155 posts
    Member since:
    Jan 2006

    Posted 29 Mar 2011 Link to this post

    I am getting this when I copy the Busy Indicator example

    The calling thread must be STA, because many UI components require this.

    Does anyone have any ideas
  2. George
    Admin
    George avatar
    1332 posts

    Posted 04 Apr 2011 Link to this post

    Hi John,

     
    Please make sure you use Dispatcher class in order to access UI components.

    If this doesn't help, can you please give us more information about your scenario? Which example do you use? 

    Best wishes,
    George
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. fred williams
    fred williams avatar
    55 posts
    Member since:
    Feb 2010

    Posted 02 May 2011 Link to this post

    Could you please provide an example of using the dispatcher class to access a UI component? I'm trying to display a busy indicator while repopulating a treeview when the user double clicks a treeviewitem and I'm receiving the same STA error.

    I get the error when I try to instantiate a new RadTreeView object.
  5. George
    Admin
    George avatar
    1332 posts

    Posted 05 May 2011 Link to this post

    Hi John,

     
    Thank you for contacting us.

    You can find the attached sample project. On a button click new items for the RadTreeView are generated and added while the busy indicator is shown. On a second click, the process is stopped. 

    I hope this helps.


    Kind regards,
    George
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Sandi Markon
    Sandi Markon avatar
    101 posts
    Member since:
    Jul 2012

    Posted 19 Sep 2012 Link to this post

     
Back to Top
UI for WPF is Visual Studio 2017 Ready