From my reading of this line "
When you are using the RadBusyIndicator control you always have to set its Content property. This will be the content on top of which you want to visualize the RadBusyIndicator control." in this article http://www.telerik.com/help/silverlight/radbusyindicator-getting-started.html I mocked up this quick demo to see if I could use it. WPF app loads a window. In the window is a frame which loads a page. On that page is a button that when clicked puts the thread to sleep for 3 seconds. In that button I get a handle to the parent window and set the IsBusy to true....but it never shows. I've tried numerous variations but I can't get it to work in my project or my mockup??
MainWindow:
<
Window
x:Class
=
"LoadingTest.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Title
=
"MainWindow"
Height
=
"350"
Width
=
"525"
>
<
Grid
>
<
telerik:RadBusyIndicator
x:Name
=
"Thnk"
IsBusy
=
"false"
telerik:StyleManager.Theme
=
"Expression_Dark"
>
<
Frame
Name
=
"frm_BigBro"
Grid.Row
=
"0"
Source
=
"Page1.xaml"
SnapsToDevicePixels
=
"True"
/>
</
telerik:RadBusyIndicator
>
</
Grid
>
</
Window
>
Main Page cs
public
void
StartThinking()
{
Thnk.IsBusy =
true
;
}
public
void
StopThinking()
{
Thnk.IsBusy =
false
;
}
Page1 XAML
<
Grid
>
<
TextBlock
Text
=
"My Page"
/>
<
Button
x:Name
=
"Button1"
Click
=
"Button1_Click"
Width
=
"80"
Height
=
"20"
/>
</
Grid
>
Page1 cs
private
void
Button1_Click(
object
sender, RoutedEventArgs e)
{
MainWindow wndow =
new
MainWindow();
wndow = Window.GetWindow(sender
as
DependencyObject)
as
MainWindow;
wndow.StartThinking();
System.Threading.Thread.Sleep(3000);
wndow.StopThinking();
}
I'm sure it works so I must be doing something wrong?
TIA
JB