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

Exception when changing prism view in region

4 Answers 146 Views
TransitionControl
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 21 Jul 2010, 07:17 PM
I have a RadTransitionControl set up as a prism Region:
<telerik:RadTransitionControl Name="MainContent"  Grid.Column="1" Grid.Row="1" cal:RegionManager.RegionName="{x:Static inf:RegionNames.MainContent}" HorizontalAlignment="Stretch" 
                                    VerticalAlignment="Stretch">
<telerik:RadTransitionControl.Transition>
<telerikTransitions:LinearFadeTransition  />
</telerik:RadTransitionControl.Transition>
</telerik:RadTransitionControl>

I'm getting an exception when switching views.  The exception is thrown when calling:
 
region.Activate(view)

The error is as follows:
System.InvalidOperationException was caught
  Message=Cannot perform action because the specified Storyboard was not applied to this object for interactive control.
  Source=PresentationFramework
  StackTrace:
       at System.Windows.Media.Animation.Storyboard.GetStoryboardClock(DependencyObject o, Boolean throwIfNull, InteractiveOperation operation)
       at System.Windows.Media.Animation.Storyboard.GetCurrentStateImpl(DependencyObject containingObject)
       at System.Windows.Media.Animation.Storyboard.GetCurrentState()
       at Telerik.Windows.Controls.TransitionControl.TransitionProvider.StopAnimation(Storyboard animation, FrameworkElement targetElement)
       at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.StopAnimation()
       at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.SetupAndStartTransitionAnimation(FrameworkElement target)
       at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.ChangeContent()
       at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.OnContentChange(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.set_CurrentContent(Object value)
       at Telerik.Windows.Controls.RadTransitionControl.OnContentChanged(Object oldContent, Object newContent)
       at System.Windows.Controls.ContentControl.OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at System.Windows.Controls.ContentControl.set_Content(Object value)
       at Microsoft.Practices.Composite.Presentation.Regions.ContentControlRegionAdapter.<>c__DisplayClass2.<Adapt>b__0(Object , NotifyCollectionChangedEventArgs )
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at Microsoft.Practices.Composite.Presentation.Regions.ViewsCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Microsoft.Practices.Composite.Presentation.Regions.ViewsCollection.AddAndNotify(IList items)
       at Microsoft.Practices.Composite.Presentation.Regions.ViewsCollection.AddAndNotify(Object item)
       at Microsoft.Practices.Composite.Presentation.Regions.ViewsCollection.itemMetadata_MetadataChanged(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at Microsoft.Practices.Composite.Presentation.Regions.ItemMetadata.InvokeMetadataChanged()
       at Microsoft.Practices.Composite.Presentation.Regions.ItemMetadata.DependencyPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Microsoft.Practices.Composite.Presentation.Regions.ItemMetadata.set_IsActive(Boolean value)
       at Microsoft.Practices.Composite.Presentation.Regions.Region.Activate(Object view)
       at Microsoft.Practices.Composite.Presentation.Regions.SingleActiveRegion.Activate(Object view)...

Any idea what's up?

4 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 26 Jul 2010, 12:22 PM
Hello Aaron,

 Could you please open a support ticket and send us a sample project that reproduces the issue? This would help us investigate the problem.

Kind regards,
Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tonci Kucic
Top achievements
Rank 1
answered on 10 Aug 2010, 10:01 AM
Hi I have the same problem so if you could provide some support? Do I need to open a support ticket?

Cheers
0
Aaron
Top achievements
Rank 1
answered on 11 Aug 2010, 01:42 PM
This was to have been fixed in an internal build.  I haven't been able to install one of the last couple internal builds, but the fix should be in the latest one.
0
Tonci Kucic
Top achievements
Rank 1
answered on 17 Aug 2010, 10:12 AM
It works now. Thank you
Tags
TransitionControl
Asked by
Aaron
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Tonci Kucic
Top achievements
Rank 1
Aaron
Top achievements
Rank 1
Share this question
or