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

BusyIndicator on Backstage

3 Answers 34 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 2
Doug asked on 12 Apr 2016, 02:00 PM

When using a RadBusyIndicator on a RadBackStageItem I receive the following error.

 

Dispatcher Unhandled Exception.
OnCurrentTimeInvalidated
Cannot animate the 'Opacity' property on a 'System.Windows.Controls.ContentPresenter' using a 'System.Windows.Media.Animation.ObjectAnimationUsingKeyFrames'. For details see the inner exception.Line: 0Column: 0

 

This happens on a dispatcher thread after the background thread has finished and I set the IsBusy to false.

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 15 Apr 2016, 08:20 AM
Hi Doug,

I wasn't able to reproduce the described behavior. Can you give me more information about the error?
  • Where the busy indicator is defined?
  • What is the strack trace of the exception and from which control is coming from?
  • How exactly and when you are changing the busy indicator's state (IsBuyse=false)?
Also, runnable code snippets or a project will be very useful in reproducing the issue.

Regards,
Martin
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Doug
Top achievements
Rank 2
answered on 15 Apr 2016, 11:38 AM

It is defined like this, though currently commented out.

 

 <telerik:RadRibbonBackstageItem Header="{x:Static properties:Resources.lblMissedRGCalls}" IsDefault="False">
                                <!--<telerik:RadBusyIndicator Name="rgmissedBusy" IsBusy="False" BusyContent="Loading...Please Wait">-->

                                <Grid Name="missedGrid" VerticalAlignment="Top">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>

                                    <StackPanel Name="mrgStack" Margin="15 15 5 5" IsVisibleChanged="mrgStack_IsVisibleChanged">

                                        <TextBlock Margin="0 0 0 2" FontSize="14" FontWeight="Bold" Text="{x:Static properties:Resources.lblMissedRGCalls48}"/>

                                        <telerik:RadGridView Name="gvMissedRG" RowIndicatorVisibility="Collapsed" AlternationCount="0" ShowGroupPanel="True" ItemsSource="{Binding}" IsReadOnly="True" EnableColumnVirtualization="True" EnableRowVirtualization="True" Margin="2" FontSize="12" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" MaxColumnWidth="200">
                                        </telerik:RadGridView>

                                    </StackPanel>
     
                                </Grid>
                                <!--</telerik:RadBusyIndicator>-->
                                
                            </telerik:RadRibbonBackstageItem>

 

When the stackpanel becomes visible I run a background thread to put some SQL data in the grid.

At the end of that thread I would call.

 

 this.Dispatcher.BeginInvoke((Action)delegate ()
                {
                    try
                    {
            rgmissedBusy.IsBusy = true;
                    }
                    catch
                    {

                    }
                }, DispatcherPriority.ApplicationIdle);

 

to stop the busy indicator.  A similar dispatcher thread is at the beginning of the thread to turn it on, and that works fine, it just never turns off, when the final code posted is called, your control errors with the message I posted in the first thread here.

0
Martin Ivanov
Telerik team
answered on 19 Apr 2016, 09:16 AM
Hello Doug,

Thank you for the code snippets. Based on them I prepared a small example in order to recreate the issue, but to no avail. Can you take a look at the attached project and let me know if I am missing something?

Regards,
Martin
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
RibbonView and RibbonWindow
Asked by
Doug
Top achievements
Rank 2
Answers by
Martin Ivanov
Telerik team
Doug
Top achievements
Rank 2
Share this question
or