Cannot freeze this Storyboard timeline tree for use across threads.

6 posts, 0 answers
  1. Shawn
    Shawn avatar
    6 posts
    Member since:
    Oct 2010

    Posted 21 Sep 2011 Link to this post

    I'm trying to figure out a good way to get a theme applied at design time. I followed someones suggestion to create a class like this and added it to the resources in my App.xaml.
    public class TelerikThemeManager : DependencyObject
    {
        public TelerikThemeManager()
        {
            StyleManager.ApplicationTheme = new MetroTheme();
        }
    }

    I'm getting this error with RadExpander when i have that in place. The (few) other controls seem to be fine. Is there a good way of getting design time theme support application wide?

    Cannot freeze this Storyboard timeline tree for use across threads.
       at System.Windows.Media.Animation.BeginStoryboard.Seal()
       at System.Windows.TriggerAction.Seal(TriggerBase containingTrigger)
       at System.Windows.TriggerActionCollection.Seal(TriggerBase containingTrigger)
       at System.Windows.TriggerBase.Seal()
       at System.Windows.Trigger.Seal()
       at System.Windows.TriggerCollection.Seal()
       at System.Windows.StyleHelper.SealTemplate(FrameworkTemplate frameworkTemplate, Boolean& isSealed, FrameworkElementFactory templateRoot, TriggerCollection triggers, ResourceDictionary resources, HybridDictionary childIndexFromChildID, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& containerDependents, FrugalStructList`1& resourceDependents, ItemStructList`1& eventDependents, HybridDictionary& triggerActions, HybridDictionary& dataTriggerRecordFromBinding, Boolean& hasInstanceValues, EventHandlersStore& eventHandlersStore)
       at System.Windows.FrameworkTemplate.Seal()
       at System.Windows.FrameworkTemplate.System.Windows.ISealable.Seal()
       at System.Windows.StyleHelper.SealIfSealable(Object value)
       at System.Windows.ResourceDictionary.SealValue(Object value)
       at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
       at System.Windows.DeferredThemeResourceReference.GetValue(BaseValueSourceInternal valueSource)
       at System.Windows.DependencyPropertyChangedEventArgs.get_NewValue()
       at System.Windows.Controls.Control.OnTemplateChanged(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.InvalidateProperty(DependencyProperty dp)
       at System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList`1& exclusionContainerDependents, FrugalStructList`1& oldContainerDependents, FrugalStructList`1& newContainerDependents)
       at System.Windows.StyleHelper.DoThemeStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style style)
       at System.Windows.StyleHelper.UpdateThemeStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style& themeStyleCache)
       at System.Windows.FrameworkElement.OnThemeStyleChanged(DependencyObject d, Object oldValue, Object newValue)
       at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
       at System.Windows.FrameworkElement.UpdateThemeStyleProperty()
       at System.Windows.FrameworkElement.OnThemeStyleKeyChanged(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.RadExpander.SetDefaultStyleKey() in c:\TB\102\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\Expander\RadExpander.cs:line 577
       at Telerik.Windows.Controls.RadExpander.OnInitialized(EventArgs e) in c:\TB\102\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\Expander\RadExpander.cs:line 571
       at System.Windows.FrameworkElement.TryFireInitialized()
       at System.Windows.FrameworkElement.EndInit()
       at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.EndInit(IInstanceBuilderContext context, ViewNode viewNode, DocumentCompositeNode compositeNode, ISupportInitialize supportInitialize)
       at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.InstantiateProperties(IInstanceBuilderContext context, ViewNode viewNode, DocumentCompositeNode compositeNode)
       at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
       at Microsoft.Expression.Platform.WPF.InstanceBuilders.FrameworkElementInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
       at MS.Internal.Services.DesignModeValueProviderService.DesignModeValueProviderBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
       at Microsoft.Expression.DesignModel.Core.ViewNodeManager.Instantiate(ViewNode viewNode)

  2. Shawn
    Shawn avatar
    6 posts
    Member since:
    Oct 2010

    Posted 22 Sep 2011 Link to this post

    I finally resolved this by uninstalling the controls and re installing them.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Rayne
    Rayne avatar
    241 posts
    Member since:
    Sep 2010

    Posted 02 Dec 2011 Link to this post

    I'm using version 2011.2.912.40. Project references binaries that are stored in a solution folder, not the ones in the GAC. How Can I fix this error?
  5. Rayne
    Rayne avatar
    241 posts
    Member since:
    Sep 2010

    Posted 02 Dec 2011 Link to this post

    More details:
    Turns out I only get this error when I set the theme to Metro. The application uses Office_Blue globally via StyleManager.ApplicationTheme but I'm overriding it in certain areas of my application using StyleManager.Theme attached property. I can pick any theme but the Metro theme. And I've only encountered this error on the Expander.
  6. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 07 Dec 2011 Link to this post

    Hi Rayne,

     Could you please elaborate more on your scenario, especially what types of controls do you use? We tried to isolate this issue in a sample project but we did not succeed as you can see in the attached project. Is it possible for you to open a new support ticket with a project attached so that we would be able to investigate it locally ? Thank you in advance.

    All the best,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  7. Rayne
    Rayne avatar
    241 posts
    Member since:
    Sep 2010

    Posted 07 Dec 2011 Link to this post

    I was able to reproduce the problem in a sample application using the dlls my project references. Then I upgraded the sample project to the latest version that I have downloaded (2011.3.1129.40) and it works as expected. So maybe there is a problem with the version of the controls I'm using. When possible, I will update my project dlls and test again.
Back to Top
UI for WPF is Visual Studio 2017 Ready