Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
RadialGauge Load Animation Freezing
posted

Hello,

I am attempting to load a RadialGauge when my application loads, but am finding that the gauge's initial animation freezes early on in its process. Here is the XAML implementing the gauge:

<Grid>
    <Gauges:XamRadialGauge x:Name="radialGauge" TransitionDuration="500" Width="Auto" Value="0" MaximumValue="2000" MinorTickCount="10" MinorTickStrokeThickness="1" TickStrokeThickness="2" NeedleShape="Needle" >
    </Gauges:XamRadialGauge>
</Grid>

In the C# code I am calling new GaugeWindow(), GaugeWindow being my implementation of the RadialGauge. The constructor looks like this:

public GaugeWindow() {

    InitializeComponent();

    ...

}

Is there a way to make sure the animation continues to completion?

Thank you,

Matt

Parents
  • 34510
    Offline posted

    Hi Matt,

    Are you doing anything else in that window?  If there is no load on the UI thread then the animation should complete smoothly.  Animations are done on the UI thread so if something else was loading in the window that blocked the UI thread then the animations may stutter / freeze.  As an example, I took your XAML and added it to a window.  On a button click I show this window.  If I don't "load" anything besides this gauge, the animation plays smoothly.  If, however, I add a DispatcherTimer that runs periodically and I sleep the UI thread inside this timer I can see the animation freeze.

    RadialGaugeFreeze.zip
Reply Children
No Data