I have a strange behavior in a Silverlight Application.
I had very high CPU load in an application that makes nearly nothing.
i removed things from the app to find the error, at the and i had an application with
- A BusyIndicator
- A Transition Control
- A UserControl
- An image where the Source attribute points to am non existing Image.
This is my main Page
Busy Indicator, With a Transition Control in it and a Button
this code is executed when the button is clicked:
When the button is clicked, the busy indicator is busy for 0,5 seconds, then the button is replaced by a usercontrol.
when the usercontrol is shown, i have 35% cpu load on my Core i7 930 when the browser is maximized on my 1920*1200 screen, smaller size gives less cpu load.
When i click on the usercontrol, the RadBusyControl.IsIndeterminate is set to false (i think this stops the animation on the INVISIBLE BusyControl) cpu load changes to 0%
this is repeatable on different computers.
Is this an issue in the Telerik controls or in Silverlight itself?
Whatever, it may be useful to stop the animation of the RadBusyControl when it is set to invisible.
ps: Why cant i upload zip files with test projects?
Greets,
Carsten
I had very high CPU load in an application that makes nearly nothing.
i removed things from the app to find the error, at the and i had an application with
- A BusyIndicator
- A Transition Control
- A UserControl
- An image where the Source attribute points to am non existing Image.
This is my main Page
<
UserControl
x:Class
=
"CpuLoadTest.MainPage"
...
<Controls:RadBusyIndicator
Name
=
"busyIndicator"
>
<
Controls:RadTransitionControl
Name
=
"transition"
>
<
Controls:RadTransitionControl.Content
>
<
Button
Margin
=
"4"
Click
=
"Test"
>Test</
Button
>
</
Controls:RadTransitionControl.Content
>
</
Controls:RadTransitionControl
>
</
Controls:RadBusyIndicator
>
</
UserControl
>
Busy Indicator, With a Transition Control in it and a Button
this code is executed when the button is clicked:
private
void
Test(
object
sender, RoutedEventArgs e)
{
busyIndicator.IsBusy =
true
;
DispatcherTimer dt =
new
DispatcherTimer();
dt.Interval = TimeSpan.FromSeconds(0.5);
dt.Tick += (o, args) =>
{
dt.Stop();
busyIndicator.IsBusy =
false
;
var userControl =
new
UserControlWithMissingImage();
userControl.MouseLeftButtonDown += (sender1, eventArgs) =>
{
busyIndicator.IsIndeterminate =
false
;
};
transition.Content = userControl;
};
dt.Start();
}
When the button is clicked, the busy indicator is busy for 0,5 seconds, then the button is replaced by a usercontrol.
<
UserControl
x:Class
=
"CpuLoadTest.UserControlWithMissingImage"
...
<Grid
x:Name
=
"LayoutRoot"
Background
=
"Wheat"
>
<
Grid.Effect
>
<
DropShadowEffect
BlurRadius
=
"7"
Color
=
"CornflowerBlue"
/>
</
Grid.Effect
>
<
Image
Source
=
"missing.jpg"
>
<
Image.Effect
>
<
DropShadowEffect
BlurRadius
=
"7"
Color
=
"CornflowerBlue"
/>
</
Image.Effect
>
</
Image
>
</
Grid
>
</
UserControl
>
when the usercontrol is shown, i have 35% cpu load on my Core i7 930 when the browser is maximized on my 1920*1200 screen, smaller size gives less cpu load.
When i click on the usercontrol, the RadBusyControl.IsIndeterminate is set to false (i think this stops the animation on the INVISIBLE BusyControl) cpu load changes to 0%
this is repeatable on different computers.
Is this an issue in the Telerik controls or in Silverlight itself?
Whatever, it may be useful to stop the animation of the RadBusyControl when it is set to invisible.
ps: Why cant i upload zip files with test projects?
Greets,
Carsten