This is a migrated thread and some comments may be shown as answers.

Set the Content Dynamically

2 Answers 29 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
c
Top achievements
Rank 1
c asked on 17 Aug 2011, 10:50 AM
Hi,
 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??
 
Thanks

2 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 22 Aug 2011, 12:21 PM
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,
Konstantina
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 >>

0
JOSE LOPEZ
Top achievements
Rank 1
answered on 31 Jan 2014, 08:14 PM
You can try a workaround I posted in my blog, I had the same problem and I solved it with this
http://www.c-sharpcorner.com/Blogs/14395/add-a-busyindicator-dynamically-to-a-silverlight-childwindow.aspx
Tags
BusyIndicator
Asked by
c
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
JOSE LOPEZ
Top achievements
Rank 1
Share this question
or