Set the Content Dynamically

3 posts, 0 answers
  1. c
    c avatar
    17 posts
    Member since:
    Apr 2011

    Posted 17 Aug 2011 Link to this post

     when I want to use the BusyIndicator like this:

    RadBusyIndicator busyIndicator = new RadBusyIndicator();
    busyIndicator.SetValue(ContentProperty, this.LayoutRoot);

    But it doesn't work,an exception will be thrown。
    So i want to ask that  how to Set the Content Dynamically??
  2. Konstantina
    Konstantina avatar
    2332 posts

    Posted 22 Aug 2011 Link to this post

    Hello C,

    In order to make it work, you will have to add the BusyIndicator to the visual tree, so I can suggest you to set for a Content of the BusyIndicator another grid, and to set the Content of the LayoutRoot to be the BusyIndicator, for example like so:

    RadBusyIndicator busy = new RadBusyIndicator();
    this.Content = busy;
    Grid grid = new Grid();
    busy.Content = grid;

    Hope this helps. 

    Kind regards,
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft R3 2016 release webinar banner
    JOSE LOPEZ avatar
    1 posts
    Member since:
    Mar 2010

    Posted 31 Jan 2014 in reply to c Link to this post

    You can try a workaround I posted in my blog, I had the same problem and I solved it with this
Back to Top